home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr46 / source14.zip / SOURCE.DOC < prev    next >
Text File  |  1993-04-22  |  131KB  |  2,809 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                    SOURCE
  26.  
  27.  
  28.                                 Version 1.4
  29.  
  30.                                April 22, 1993
  31.  
  32.  
  33.                                  Written by
  34.  
  35.                                  Rick Maddy
  36.  
  37.                           SOURCE Table of Contents
  38.  
  39.      1    Distribution . . . . . . . . . . . . . . . . . . . . . .   1
  40.  
  41.      2    What is SOURCE?  . . . . . . . . . . . . . . . . . . . .   1
  42.  
  43.      3    Quick Start  . . . . . . . . . . . . . . . . . . . . . .   2
  44.  
  45.      4    The SOURCE Command Line  . . . . . . . . . . . . . . . .   3
  46.           4.1  Global Options  . . . . . . . . . . . . . . . . . .   3
  47.           4.2  Filenames . . . . . . . . . . . . . . . . . . . . .   4
  48.           4.3  Local Options . . . . . . . . . . . . . . . . . . .   5
  49.           4.4  Full Command Line . . . . . . . . . . . . . . . . .   6
  50.  
  51.      5    SOURCE Options . . . . . . . . . . . . . . . . . . . . .   6
  52.  
  53.      6    SOURCE.CFG . . . . . . . . . . . . . . . . . . . . . . .  21
  54.           6.1  SOURCE.CFG Location . . . . . . . . . . . . . . . .  21
  55.           6.2  Named Configuration Options . . . . . . . . . . . .  22
  56.           6.3  SOURCE.CFG Format . . . . . . . . . . . . . . . . .  23
  57.           6.4  Commenting SOURCE.CFG . . . . . . . . . . . . . . .  23
  58.           6.5  Modifying SOURCE.CFG  . . . . . . . . . . . . . . .  24
  59.  
  60.      7    SOURCE.PRT . . . . . . . . . . . . . . . . . . . . . . .  24
  61.           7.1  Default Printer . . . . . . . . . . . . . . . . . .  24
  62.           7.2  SOURCE.PRT Format . . . . . . . . . . . . . . . . .  24
  63.           7.3  Modifying Your Printer  . . . . . . . . . . . . . .  29
  64.  
  65.      8    SOURCE.LNG . . . . . . . . . . . . . . . . . . . . . . .  29
  66.           8.1  SOURCE.LNG Location . . . . . . . . . . . . . . . .  29
  67.           8.2  SOURCE.LNG Format . . . . . . . . . . . . . . . . .  30
  68.           8.3  Commenting SOURCE.LNG . . . . . . . . . . . . . . .  30
  69.           8.4  Defining Language Specific Features . . . . . . . .  31
  70.                8.4.1     Comments  . . . . . . . . . . . . . . . .  31
  71.                8.4.2     String and Character Literals . . . . . .  32
  72.                8.4.3     Blocks  . . . . . . . . . . . . . . . . .  33
  73.                8.4.4     Keywords  . . . . . . . . . . . . . . . .  34
  74.                8.4.5     Include Files . . . . . . . . . . . . . .  35
  75.                8.4.6     Page Feeds  . . . . . . . . . . . . . . .  36
  76.                8.4.7     Complete Definition . . . . . . . . . . .  37
  77.           8.5  General Points  . . . . . . . . . . . . . . . . . .  38
  78.  
  79.      9    Network Support  . . . . . . . . . . . . . . . . . . . .  39
  80.  
  81.      10   Definition of Shareware  . . . . . . . . . . . . . . . .  40
  82.  
  83.      11   Disclaimer - Agreement For Using SOURCE  . . . . . . . .  40
  84.  
  85.      12   Registering  . . . . . . . . . . . . . . . . . . . . . .  41
  86.  
  87.      13   Future Enhancements  . . . . . . . . . . . . . . . . . .  41
  88.  
  89.      14   Acknowledgements . . . . . . . . . . . . . . . . . . . .  41
  90.  
  91.      15   Release History  . . . . . . . . . . . . . . . . . . . .  42
  92.  
  93.      SOURCE REGISTRATION . . . . . . . . . . . . . . . . . . . . .  46
  94.  
  95.                                      i
  96.                                    SOURCE
  97.  
  98.      SOURCE Version 1.4 - Source Code Printing Program
  99.      Copyright 1992, 1993 Rick Maddy
  100.  
  101.      1    Distribution
  102.  
  103.      The SOURCE program is made up of these files:
  104.  
  105.           SOURCE.EXE     The SOURCE program file.
  106.           SOURCE.DOC     This documentation file.
  107.           SOURCE.PRT     The default printer definition file.
  108.           SOURCE.CFG     The default configuration option file.
  109.           SOURCE.LNG     The default language definition file.
  110.           README.1ST     Quick summary and last minute notes.
  111.           REGISTER.TXT   Order form to register SOURCE.
  112.  
  113.      This unregistered shareware program is distributed in a self-
  114.      extracting compressed file.  SRCV14.EXE may be passed onto as
  115.      many people as you like, provided it remains intact, ALL files
  116.      are kept together, and only the original files are distributed. 
  117.      DO NOT compress and pass on your modified files.  See section 10
  118.      below for further information on shareware.
  119.  
  120.      2    What is SOURCE?
  121.  
  122.      SOURCE, in its most basic form, is a program for printing source
  123.      code and text files.  However, using SOURCE to its fullest
  124.      potential gives you an extremely powerful and flexible program
  125.      for printing source code and allows for numerous options for
  126.      formatting the output:
  127.  
  128.           - Custom page sizing
  129.           - Adjustable margins
  130.           - Page orientation (portrait or landscape) 
  131.           - Character pitch (pica, elite, or compressed)
  132.           - Number of columns per page
  133.           - User definable page header/footers
  134.           - Optional banner page before/after files
  135.           - Output may be redirected to any device or file
  136.           - Printing ranges may be specified, including starting
  137.             and/or ending line or page numbers
  138.           - Multiple files can be queued for printing
  139.           - List files may used to specify a number of files to print
  140.           - Manual duplex printing
  141.           - Verification and stats on each file prior to printing
  142.  
  143.      In addition to these basic printing options, SOURCE contains many
  144.      options specifically geared toward formatting source code (such
  145.      as C, Pascal, Fortran, dBase, or whatever you code in).  These
  146.      include:
  147.  
  148.           - User definable line and page numbering
  149.           - Comments in the source code may be printed as bold,
  150.             italic, or underlined  
  151.           - Keywords may be highlighted
  152.           - Code blocks grouped graphically
  153.  
  154.                                      1
  155.                                    SOURCE
  156.  
  157.           - Adjustable tab sizes for printing
  158.           - Automatic printing of include files
  159.           - Configurable language support
  160.  
  161.      These are just some of the powerful options available to you. 
  162.      Virtually nothing about SOURCE is hard coded.  If you do not like
  163.      the way something is printed, you can change to your tastes and
  164.      need.  Yet, SOURCE is very easy to use.  SOURCE only needs to
  165.      know the name of the file(s) you wish to print and it does the
  166.      rest.  You can use SOURCE right out of the box (so to speak).  
  167.  
  168.      For example:
  169.  
  170.      C:\> SOURCE kludge.c
  171.  
  172.      This would print your file to the default printer using the built
  173.      in defaults. 
  174.  
  175.      You may configure each option to suit your needs.  See section 5
  176.      for a complete list of all the options.  Besides the printing
  177.      options, SOURCE is extremely flexible in its ability to work with
  178.      almost any printer and most programming languages. 
  179.  
  180.      To facilitate this dynamic environment, SOURCE consists of an
  181.      executable (SOURCE.EXE) and three support files:
  182.  
  183.           SOURCE.PRT:    Contains all the printer definitions.
  184.           SOURCE.CFG:    Contains all the default options used by
  185.                          SOURCE to print your files.
  186.           SOURCE.LNG:    Contains all the language and filename
  187.                          extension specifications needed for comment
  188.                          and keyword highlighting and block grouping.
  189.  
  190.      By default, all four files that make up SOURCE are named
  191.      "SOURCE.???" where '???' is "EXE", "PRT", "CFG", and "LNG".  If
  192.      you prefer to use a different name, such as "SRC", instead of
  193.      "SOURCE", simply rename all four files to the same prefix. 
  194.      Example:
  195.  
  196.           C:\>ren source.* src.*
  197.  
  198.      This will result in all four files having the "SRC.???" name
  199.      instead of "SOURCE.???".  Anywhere in this documentation you are
  200.      to execute "SOURCE", enter "SRC" instead.  The only advantage to
  201.      this is to save on typing "SOURCE" all the time, now you enter
  202.      "SRC".  You could even change all the names to "S" if you really
  203.      like terse, UNIX-like command names.
  204.  
  205.      3    Quick Start
  206.  
  207.      Before running SOURCE for the first time (as if you have read
  208.      this far without having already done so), make sure you have
  209.      placed SOURCE.EXE, SOURCE.PRT, SOURCE.LNG, and SOURCE.CFG all
  210.      within the same directory.  You may also wish to include this
  211.      directory in your path so that you can run SOURCE from anywhere
  212.  
  213.                                      2
  214.                                    SOURCE
  215.  
  216.      on your system.  If you need more information on PATHs, see your
  217.      DOS manual.
  218.  
  219.      The simplest way of running SOURCE is to type:
  220.  
  221.           SOURCE filename.ext
  222.  
  223.      "SOURCE" is the program SOURCE and "filename.ext" is the name of
  224.      the file you are going to print.  You may press the [Esc] key
  225.      anytime while a file is printing to abort SOURCE and stop the
  226.      current file from printing.  Remember, most printers have buffers
  227.      and the printing will probably not stop immediately.
  228.  
  229.      The first time you run SOURCE you will be asked to select your
  230.      default printer.  This printer should be the one connected to
  231.      printer port one, "LPT1:".  If you are using a different port,
  232.      see section 6.5 for information on changing the printer port used
  233.      by SOURCE.  The list of printers initially supported by SOURCE
  234.      contains printers which should cover most of the printers in use. 
  235.      Pick the printer that closest matches the one you have.  
  236.  
  237.           Note:  If none of the printers are like yours, select
  238.           the "Generic" printer for now.  You will still be able
  239.           to print files, you just won't be able to take full
  240.           advantage of SOURCE's strengths.  Later on you'll see
  241.           how to modify SOURCE.PRT to take full advantage of your
  242.           printer.  See section 7 for more information on printer
  243.           definitions.
  244.  
  245.      Typing "SOURCE" at the prompt with no options will give you a few
  246.      lines about the general command line syntax.  You may type
  247.      "SOURCE -?" to see a few screens showing the command line syntax,
  248.      what each option is, and the options' current defaults.  After
  249.      the options, you will be shown what printers, languages, and
  250.      named configuration options are defined in the SOURCE.PRT,
  251.      SOURCE.LNG, and SOURCE.CFG files. 
  252.  
  253.      4    The SOURCE Command Line
  254.  
  255.      SOURCE is a command line program.  To run SOURCE, type the name
  256.      of this program, SOURCE, followed by any options you wish to use
  257.      along with the filename(s) of the file(s) you wish to print.  The
  258.      command line syntax is as follows:
  259.  
  260.      SOURCE [-global options] filename.ext [-local options] . . .
  261.  
  262.      Objects in square brackets are optional and the ". . ." means you
  263.      may repeat as many filenames as you wish to have printed.
  264.  
  265.      The command line has two levels of options, global and local. 
  266.      Global options are configuration options that apply to all files
  267.      on the command line.  Local options only apply to the files that
  268.      immediately precede them. 
  269.  
  270.      4.1  Global Options
  271.  
  272.                                      3
  273.                                    SOURCE
  274.  
  275.      Global options appear after the program name and before the first
  276.      filename.  These options apply to all the files specified on the
  277.      command line.  Global parameters are optional.  The syntax of
  278.      global options is a hyphen ( - ) followed by a one letter option
  279.      followed by any required parameters.  Options that take
  280.      parameters require that there be no space between the option and
  281.      the parameter.  String parameters are slightly different.  A
  282.      space before the parameter is allowed.  String parameters may
  283.      also be enclosed in double quotes.  The quotes are required only
  284.      if the string contains spaces.  An example is:
  285.  
  286.           SOURCE -n -N4 -r com1
  287.  
  288.      The above example only contains global options (in this case,
  289.      four digit line numbers with output redirected to comm port one).
  290.      This example will not actually produce any output because no
  291.      files are specified yet.
  292.  
  293.      Options that you use frequently can be permanently preset within
  294.      the SOURCE.CFG file.  This way, you do not have to specify them
  295.      each time you use SOURCE.  See section 6 for a discussion on
  296.      setting global options as defaults. 
  297.  
  298.      4.2  Filenames
  299.  
  300.      After the global parameters, if any, you may specify the files
  301.      you wish to print.  In the simplest form, this would be a single
  302.      filename and its extension.
  303.  
  304.           SOURCE foobar.c
  305.  
  306.      Running this would cause SOURCE to print the file "foobar.c" from
  307.      the current directory.  To specify a file in another directory or
  308.      on another disk drive, use the full path name, as in the example
  309.      below:
  310.  
  311.           SOURCE c:\src\code.pas
  312.  
  313.      This would print the file "code.pas" found in the "c:\src"
  314.      directory despite your current working directory.
  315.  
  316.      There are four methods for printing multiple files.  The most
  317.      tiresome is to run SOURCE once for each file you need to print.
  318.  
  319.      The second option is to use wildcards when specifying the
  320.      filename.  The wildcards allowed are '*' and '?'.  These behave
  321.      exactly like the wildcards used by DOS commands (such as copy and
  322.      delete).  If you do not understand how wildcards work, please
  323.      refer to your DOS manual for more information.  An example of
  324.      wildcard use is:
  325.  
  326.           SOURCE *.c
  327.  
  328.  
  329.  
  330.  
  331.                                      4
  332.                                    SOURCE
  333.  
  334.      This would cause SOURCE to print all files in the current
  335.      directory that had the extension ".c".  Each file will be printed
  336.      separately, starting on page one, line one.
  337.  
  338.      The third method for printing multiple files is to enter more
  339.      than one name on the command line:
  340.  
  341.           SOURCE program.c data.txt
  342.  
  343.      This would cause SOURCE to print the two files, "program.c" and
  344.      "data.txt", from the current directory.  You may specify as many
  345.      files as the command line has room for.
  346.  
  347.      The final method makes use of what is known as a list file.  A
  348.      list file is simply a text file that contains a list of files,
  349.      one per line.  Each line may specify one pathname.  This pathname
  350.      may be just a filename (with or without wildcards), or a filename
  351.      with a complete path.  A sample list file would look as follows:
  352.  
  353.           c:\src\file.c
  354.           src.*
  355.           myfile.txt
  356.  
  357.      This list file contains three entries.  The first line specifies
  358.      to print the file named "file.c" located in the "c:src"
  359.      directory.  The second line specifies to print all files which
  360.      have the name "src" with any extension located in the current
  361.      directory.  The last line specifies to print the file named
  362.      "myfile.txt" located in the current directory.  To specify a list
  363.      file in the command line, enter it as if it were the file to be
  364.      printed but precede the name with the '@' sign.  Assuming the
  365.      earlier list of three items was placed in a file called
  366.      "mylist.txt" in the current directory, the command line would
  367.      look as follows:
  368.  
  369.           SOURCE @mylist.txt
  370.  
  371.      The name of the list file can include a pathname if needed but it
  372.      may not contain any wildcards ('?' or '*').
  373.  
  374.      Any combination of these four methods may be used, for example:
  375.  
  376.           SOURCE *.c b:*.txt @files.lst c:\proj\*.*
  377.  
  378.      This command line would print all 'C' files in the current
  379.      directory, all files with the extension ".txt" from the disk in
  380.      the B drive, all files listed in the "files.lst" list file, and
  381.      all files from the "proj" directory of the C drive.
  382.  
  383.      4.3  Local Options
  384.  
  385.      In addition to the global options, you may specify "local"
  386.      options after each filename.  These local options override the
  387.      global options and only apply to the file they immediately follow
  388.      on the command line.  If they follow a list file, the local
  389.  
  390.                                      5
  391.                                    SOURCE
  392.  
  393.      options apply to all files specified by the list file.  Local
  394.      options are optional.  The syntax for local options is identical
  395.      to that of global options (see section 4.1).  Example:
  396.  
  397.           SOURCE -n hello.c goodbye.c -n-
  398.  
  399.      This command will cause SOURCE to print the file "hello.c" from
  400.      the current directory with line numbers and "goodbye.c" without
  401.      line numbers.  The global option "-n" causes line numbering to be
  402.      turned on for all files.  Specifying "-n-" after "goodbye.c"
  403.      tells SOURCE to turn line numbering off only for "goodbye.c" and
  404.      does not affect "hello.c".  Local options used after filenames
  405.      with wildcards will apply to all the files matched by the
  406.      wildcards:
  407.  
  408.           SOURCE *.c -b -cb
  409.  
  410.      will print all 'C' files with block tracing and comments
  411.      highlighted in bold print for each file.  This also shows that
  412.      you may specify more than one local option per file.  Of course,
  413.      you do not have to specify any local options if they are not
  414.      needed.
  415.  
  416.      4.4  Full Command Line
  417.  
  418.      The command line for SOURCE is very flexible.  This flexibility
  419.      can also lead to some pretty long and complicated command lines. 
  420.      There are many ways to remedy this.  See section 6 for ways to
  421.      minimize the command line options.  The most complex command line
  422.      would be as follows:
  423.  
  424.           SOURCE -n -N4 file.pas -cb -b *.c -h2 *.dat -n-
  425.  
  426.      This line contains global options and three file specifications
  427.      each giving their own local options.  You will not normally have
  428.      such lines, but the power is there to use.
  429.  
  430.      5    SOURCE Options
  431.  
  432.      What follows is an alphabetized list of all the command line
  433.      options that SOURCE recognizes.  These options may be specified
  434.      as global or local options on the command line (unless indicated
  435.      otherwise).  They may also appear in the SOURCE.CFG file to
  436.      define default options for those options you wish to have in
  437.      effect each time you run SOURCE.  See section 6 for more on the
  438.      SOURCE.CFG file.  All options are case sensitive so do not run
  439.      SOURCE with your caps lock on.
  440.  
  441.      Conventions used below:
  442.  
  443.           [x]       Square brackets indicate optional items.  There
  444.                     may not be a space between the option and the
  445.                     parameter if specified.  Example:
  446.  
  447.                     n[-] may entered as n or n-.
  448.  
  449.                                      6
  450.                                    SOURCE
  451.  
  452.           {x|y}     Curly braces containing a list of choices
  453.                     separated with a vertical bar indicate that you
  454.                     must select one of the options available for that
  455.                     item.  There may not be a space between the option
  456.                     and the chosen parameter.  Example:
  457.  
  458.                     a{a|o|r} allows aa, ao, or ar.
  459.  
  460.           "text"    Quotes indicate that you must enter a text string. 
  461.                     You do not have to type the double quotes unless
  462.                     the string contains spaces.  There may be a space
  463.                     between the option and the string.  Example:
  464.  
  465.                     z "list" allows:
  466.                          z.exe.obj      <== No spaces
  467.                          z".exe.obj"    <== Quotes optional, no spaces
  468.                          z".exe .obj"   <== Quotes required, spaces
  469.                          z .exe.obj
  470.                          z ".exe.obj"
  471.                          z ".exe .obj"
  472.  
  473.                     Not allowed would be:
  474.  
  475.                          z .exe .obj
  476.  
  477.                     because the parameter contains a space and must be
  478.                     enclosed in quotes.
  479.  
  480.           #         A pound symbol indicates that you must enter a
  481.                     number after the option.  Numbers may be made up
  482.                     of the 10 numeric digits and minus for negative
  483.                     numbers.  There may not be a space between the
  484.                     option and the number.  Example:
  485.  
  486.                     w# allows w1, w2, w3, etc.
  487.                     h# allows h-1, h2, h0, etc.
  488.  
  489.  
  490.      Option         Description
  491.  
  492.      -?             Help.  The '?' option displays a quick command
  493.                     summary showing all the available options and
  494.                     their current defaults.  Running SOURCE with no
  495.                     options simply shows the command line syntax and
  496.                     the '-?' option.
  497.  
  498.      -$             Shareware Message.  The '$' option causes a full
  499.                     screen message to display about registering
  500.                     SOURCE.  This command is only recognized if in
  501.                     SOURCE.CFG or as a global command line option.
  502.  
  503.      -a{a|o|r}      Append/Overwrite.  The 'a' option describes the
  504.                     action SOURCE will take when redirecting the
  505.                     output to a file and the file already exists.  See
  506.                     the 'r' option for more on redirecting the output. 
  507.  
  508.                                      7
  509.                                    SOURCE
  510.  
  511.                     When the 'a' option is followed by an 'a', SOURCE
  512.                     will automatically append the new output to the
  513.                     previous contents of the file.  When followed by
  514.                     an 'o', SOURCE will automatically overwrite the
  515.                     old contents of the file and leave only the new
  516.                     output.  When followed by an 'r', SOURCE will
  517.                     interactively prompt you for the action to take. 
  518.                     You may specify 'append', 'overwrite', enter a
  519.                     different file, or quit SOURCE.  Default is 'ar',
  520.                     request.
  521.  
  522.      -b[-]          Block Grouping.  The 'b' option sets whether block
  523.                     grouping is turned on or not.  The 'b' may be
  524.                     followed by '-'.  The 'b' option alone turns on
  525.                     block grouping, the minus turns it off.  For this
  526.                     option to work, SOURCE must know what language the
  527.                     file is written in.  This is done by using the
  528.                     filename extension as defined in the SOURCE.LNG
  529.                     file or the 'x' option may be used to force a
  530.                     specific language.  The lines used for block
  531.                     grouping may be drawn using either standard ASCII
  532.                     characters or the IBM line drawing characters. 
  533.                     See the 'g' option to set how the lines are drawn. 
  534.                     Default is 'b', block grouping on.
  535.  
  536.                     Below is some sample C code with block grouping
  537.                     turned on:
  538.  
  539.                          while (x < 10)
  540.                               ┌{
  541.                               │if (a < b)
  542.                               │    ┌{
  543.                               │    │puts("Hello");
  544.                               │    └}
  545.                               │else
  546.                               │    ┌{
  547.                               │    │puts("Goodbye");
  548.                               │    └}
  549.                               │x++;
  550.                               └}
  551.  
  552.                     The above also assumes the 'g' option is on.  With
  553.                     the 'g' option off, the same code looks as
  554.                     follows:
  555.  
  556.                          while (x < 10)
  557.                               +{
  558.                               |if (a < b)
  559.                               |    +{
  560.                               |    |puts("Hello");
  561.                               |    +}
  562.                               |else
  563.                               |    +{
  564.                               |    |puts("Goodbye");
  565.                               |    +}
  566.  
  567.                                      8
  568.                                    SOURCE
  569.  
  570.                               |x++;
  571.                               +}
  572.  
  573.      -B[*]#         Banner.  The 'B' option allows you to print a
  574.                     banner before and/or after each file.  The banner
  575.                     contains the filename and extension in BIG
  576.                     letters.  The 'B' must be followed by a number
  577.                     from 0 to 3.  0 means no banner at all.  1 means a
  578.                     banner only before the file.  2 means a banner
  579.                     only after the file.  3 means a banner before and
  580.                     after the file.  You may also specify an optional
  581.                     asterisk ('*') before the number.  This will cause
  582.                     the letters of the banner to be made up of
  583.                     asterisks instead of the default individual
  584.                     letter.  Default is 'B3', print banner before and
  585.                     after using letters.
  586.  
  587.      -c{b|u|i|o|n}  Comment Highlighting.  The 'c' option sets whether
  588.                     comments within your programming code are
  589.                     highlighted or not.  The 'c' may be followed by
  590.                     'b'old, 'u'nderline, 'i'talic, 'o'ther, or 'n'one. 
  591.                     For this option to work, SOURCE must know what
  592.                     language the file is written in.  This is done by
  593.                     using the filename extension as defined in the
  594.                     SOURCE.LNG file or the 'x' option may be used to
  595.                     force a specific language.  The highlighting
  596.                     method used is as defined in the SOURCE.PRT file
  597.                     for the selected type.  Default is 'cb',
  598.                     highlighted comments in bold.
  599.  
  600.      -d "printer"   Select Printer.  The 'd' option specifies which
  601.                     printer definition in the SOURCE.PRT file SOURCE
  602.                     should use when printing out files.  The 'd' must
  603.                     be followed by the printer name.  The name
  604.                     specified is not case sensitive.  If you only have
  605.                     one printer connected to your computer you will
  606.                     not need to use this option.
  607.  
  608.                     If you have multiple printers connected to
  609.                     different ports, you can specify this option at
  610.                     the command line when you are using a printer
  611.                     other than the default.  If this is the case, you
  612.                     will also need to use the 'r' option to specify
  613.                     the port the printer is connected to.  If you use
  614.                     different printers often, you may wish to define a
  615.                     named configuration in the SOURCE.CFG file for
  616.                     each printer.  Then all you need to specify on the
  617.                     command line is the 'u' option.  See the 'u'
  618.                     option for more details on using named
  619.                     configurations.  The default printer is selected
  620.                     by the user the first time SOURCE is run or by
  621.                     modifying the SOURCE.PRT file.  See section 7 for
  622.                     more on SOURCE.PRT.
  623.  
  624.  
  625.  
  626.                                      9
  627.                                    SOURCE
  628.  
  629.      -e[-]          Escape Codes.  The 'e' option sets whether printer
  630.                     escape codes are output along with your text or
  631.                     not.  Normally you would want this left on so your
  632.                     printer will print the file properly.  Turning
  633.                     this option off would typically be used when
  634.                     redirecting output to a file when you would not
  635.                     want the escape codes embedded in the target file. 
  636.                     The 'e' may be followed by '-'.  The 'e' option
  637.                     alone causes the codes to be printed, the minus
  638.                     prevents the codes.  Default is 'e', codes
  639.                     printed.
  640.  
  641.      -E{t|b|l|r}#   Page Margins.  The 'E' option is used to set the
  642.                     page margins to specified values.  The 'E' must be
  643.                     followed by a 't', 'b', 'l', or an 'r'.  These
  644.                     represent the top, bottom, left, and right margins
  645.                     respectively.  The letter must then be followed by
  646.                     a positive number in inches for the margin.  An
  647.                     example would be 'El1.5', this would set the left
  648.                     margin to 1.5 inches.  A value of zero means the
  649.                     margin specified in the selected printer
  650.                     definition will be used.  More than one margin may
  651.                     be set by stringing the options together.  To set
  652.                     both the top and bottom margin, specify 'Et.75b1'. 
  653.                     This would cause a 3/4 inch top margin and a one
  654.                     inch bottom margin.  Just like in the printer
  655.                     definition, the margin value must be equal to or
  656.                     greater than the corresponding edge value from the
  657.                     selected printer definition.  If the specified
  658.                     margin is too big or too small, the default margin
  659.                     from the printer definition will be used instead. 
  660.                     Default is 'Et0b0l0r0', use all the printer
  661.                     definition defaults.
  662.  
  663.      -f#            Final Line.  The 'f' option allows you to specify
  664.                     the last physical line number of the file to print
  665.                     out.  This would be used to print only a desired
  666.                     block of code instead of having to print the
  667.                     entire file.  The 'f' must be followed by a
  668.                     positive number.  Specifying zero means the last
  669.                     physical line.  This option may not be used with
  670.                     the 'F' or 'I' options unless set to zero. 
  671.                     Default is 'f0', print through last line.
  672.  
  673.      -F#            Final Page.  The 'F' option allows you to specify
  674.                     the number of the last physical page of the file
  675.                     to print out.  This would be used to print only a
  676.                     block of code, or part of a page range, instead of
  677.                     printing out the entire file.  The 'F' must be
  678.                     followed by a positive number.  Specifying zero
  679.                     means the last physical page.  This option may not
  680.                     be used with the 'f' or 'i' options unless set to
  681.                     zero.  Default is 'F0', print through last page.
  682.  
  683.  
  684.  
  685.                                      10
  686.                                    SOURCE
  687.  
  688.      -g[-]          Graphics.  The 'g' option determines how the block
  689.                     group lines are printed (see option 'b' for more
  690.                     on block grouping).  When the option is on, the
  691.                     lines will be printed using the IBM line drawing
  692.                     characters.  With the option off, simple ASCII
  693.                     characters will be used.  If your printer cannot
  694.                     print the extended IBM character set then turn
  695.                     this off.  If your printer can print the lines
  696.                     then set this to on.  You may need to send a
  697.                     special code to your printer to select the IBM
  698.                     extended character set.  To do so, place the
  699.                     proper printer codes in the 'Init' record in the
  700.                     SOURCE.PRT file for your printer.  Default is
  701.                     'g-', print using standard ASCII.
  702.  
  703.      -h#            Header Page.  The 'h' option is used to specify
  704.                     when to print the page header or footer.  The 'h'
  705.                     must be followed by a number.  Zero means no
  706.                     header or footer will be printed.  A one means to
  707.                     print the header only on the first page.  Any
  708.                     value of two or more will result in the header
  709.                     being printed on all pages.  To cause the header
  710.                     to be printed at the bottom of the page (now a
  711.                     footer), specify a negative number.  Negative one
  712.                     means to print a footer only on the first page. 
  713.                     Any number of -2 or less (-100 etc.) will cause
  714.                     the footer to be placed on all pages.  Page
  715.                     headers and footers are underlined and printed in
  716.                     10 pitch regardless of the pitch selected for the
  717.                     rest of the file.  The contents of the header are
  718.                     defined by using the 'H' option.  Default is 'h2',
  719.                     header on all pages.
  720.  
  721.      -H "header"    Header Definition.  The 'H' option is used to
  722.                     define the contents of the header or footer.  See
  723.                     the 'h' option to specify when to print the
  724.                     header/footer.  The definition consists of literal
  725.                     text and escape codes.  Since the definition will
  726.                     likely contain literal spaces, remember to enclose
  727.                     the definition within double quotes.  The escape
  728.                     commands are case sensitive and literal text will
  729.                     be shown as entered.  The escape sequences are
  730.                     described here:
  731.  
  732.                     &fn       Current filename and extension.  The
  733.                               filename is shown in uppercase.  No path
  734.                               is displayed.
  735.                     &fd#c     File creation date in specified format
  736.                               where # is 1 to 5 and c is the delimiter
  737.                               character ('/', ',', or '.').
  738.                     &ft#c     File creation time in specified format
  739.                               where # is 1 to 4 and c is the delimiter
  740.                               character (':', ',', or '.').
  741.  
  742.  
  743.  
  744.                                      11
  745.                                    SOURCE
  746.  
  747.                     &cd#c     Current date in specified format where #
  748.                               is 1 to 5 and c is the delimiter
  749.                               character ('/', ',', or '.').
  750.                     &ct#c     Current time in specified format where #
  751.                               is 1 to 4 and c is the delimiter
  752.                               character (':', ',', or '.').
  753.                     &pn#      Current page number in specified format
  754.                               where # is the number of digits the page
  755.                               number will take up.  The value must be
  756.                               in the range 1 to 9.  The page number
  757.                               will be left padded with spaces.  If you
  758.                               prefer zeros instead, precede the number
  759.                               with a zero.  Example:  &pn03.
  760.                     &pctext#  Page count in specified format where
  761.                               text is literal text to be printed
  762.                               before the number (including spaces) and
  763.                               # is the number of digits the page count
  764.                               will take up.  The value must be in the
  765.                               range 1 to 9.  The page count will be
  766.                               left padded with spaces.  If you prefer
  767.                               zeros instead, precede the number with a
  768.                               zero.  Example:  &pc of 03.  This will
  769.                               print " of 99" where 99 is the actual
  770.                               page count.  The page count and the
  771.                               specified text only appear if the 'q'
  772.                               option was used to determine the total
  773.                               number of pages.  If the 'q' option was
  774.                               not used, the page count and its text
  775.                               will not appear at all in the header. 
  776.                               When used with the 'I' or 'J' options
  777.                               with values other than one, the page
  778.                               number and page count will seem strange.
  779.                     &li       Initial line number on page.
  780.                     &lf       Final line number on page.
  781.                     &h+       Turn on highlighting (using bold).
  782.                     &h-       Turn off highlighting (using bold).
  783.                     &jl       Left justify text.
  784.                     &jc       Center justify text.
  785.                     &jr       Right justify text.
  786.                     &&        Prints a literal ampersand character.
  787.  
  788.                     Date formats:
  789.                     1)   mm dd yy       ex.  &fd1/     07/31/92
  790.                     2)   dd mm yy       ex.  &cd2.     31.07.92
  791.                     3)   yy mm dd       ex.  &cd3,     92,07,31
  792.                     4)   dd Mmm yy      ex.  &fd4-     31-Jul-92
  793.                     5)   Month dd  yyyy ex.  &cd5,     July 31, 1992
  794.  
  795.                     Time formats:
  796.                     1)   hh mm ss       ex.  &ct1:     15:45:21
  797.                     2)   hh mm          ex.  &ft2.     15.45
  798.                     3)   hh mm ss am    ex.  &ft3,     03,45,21 pm
  799.                     4)   hh mm am       ex.  &cd4:     03:45 pm
  800.  
  801.                     Example header definition:
  802.  
  803.                                      12
  804.                                    SOURCE
  805.  
  806.                     '&h+File:&h-  &fn&jr&h+Page:&h-  &pn03'
  807.  
  808.                     This definition results in the following text:
  809.  
  810.                     File:  filename.ext                     Page:  001
  811.  
  812.                     where the text 'File:' and 'Page:' are
  813.                     highlighted, 'filename.ext' is the actual filename
  814.                     of the file, and the page number is right
  815.                     justified on the page.  Default is "File:  ",
  816.                     filename, file date, file time, "Printed:  ",
  817.                     date, time, "Page:  ", page number.
  818.  
  819.      -i#            Initial Line.  The 'i' option allows you to
  820.                     specify the first physical line number of the file
  821.                     to output.  This would be used to print only a
  822.                     block of code instead of the whole file.  The 'i'
  823.                     must be followed by a positive number.  Specifying
  824.                     zero means the first physical line.  It is likely
  825.                     that 'i' would be used in conjunction with the 'f'
  826.                     option to print a specific range of text starting
  827.                     and finishing at the line numbers chosen.  This
  828.                     option may not be used with the 'F' or 'I' options
  829.                     unless set to zero.  Default is 'i0', the first
  830.                     line.
  831.  
  832.      -I#            Initial Page.  The 'I' option allows you to
  833.                     specify the first physical page number of the file
  834.                     to output.  This would be used to print only a
  835.                     block of code instead of the whole file.  The 'I'
  836.                     must be followed by a positive number.  Specifying
  837.                     zero means the first physical page.  It is likely
  838.                     that 'I' would be used in conjunction with the 'F'
  839.                     option to print a specific range of text starting
  840.                     and finishing at the page numbers chosen.  This
  841.                     option may not be used with the 'f' or 'i' options
  842.                     unless set to zero.  Default is 'I0', the first
  843.                     page.
  844.  
  845.      -j#            Beginning Line.  The 'j' option allows you to
  846.                     begin line numbering at a number other than the
  847.                     actual line number.  For example, if you specify
  848.                     'SOURCE -j35 file.ext', SOURCE will print the
  849.                     file's line numbers starting at 35 instead of 1. 
  850.                     This may also be used in conjunction with the 'i'
  851.                     or 'I' options.  'SOURCE -i100 -j23 file.txt' will
  852.                     cause SOURCE to print physical lines 100 to the
  853.                     end of file.txt but will show them as line 23 and
  854.                     up.  Default is 'j0', use actual line numbers.
  855.  
  856.      -J#            Beginning Page.  The 'J' option allows you to
  857.                     begin page numbering at a number other than the
  858.                     actual page number.  For example, if you specify
  859.                     'SOURCE -J6 file.ext', SOURCE will print the
  860.                     file's page numbers starting at 6 instead of 1. 
  861.  
  862.                                      13
  863.                                    SOURCE
  864.  
  865.                     This may also be used in conjunction with the 'i'
  866.                     or 'I' option.  'SOURCE -I10 -J2 file.txt' will
  867.                     cause SOURCE to print physical pages 10 to the end
  868.                     of file.txt but will show them as page 2 and up. 
  869.                     Default is 'J0', use actual page numbers.
  870.  
  871.      -k{b|u|i|o|n}  Keyword Highlighting.  The 'k' option sets whether
  872.                     keywords within your programming code are
  873.                     highlighted or not.  The 'k' may be followed by
  874.                     'b'old, 'u'nderline, 'i'talic, 'o'ther, or 'n'one. 
  875.                     Only those words listed in the "keyword" section
  876.                     of a language definition are highlighted.  For
  877.                     this option to work, SOURCE must know what
  878.                     language the file is written in.  This is done by
  879.                     using the filename extension as defined in the
  880.                     SOURCE.LNG file or the 'x' option may be used to
  881.                     force a specific language.  The highlighting
  882.                     method used is as defined in the SOURCE.PRT file
  883.                     for the selected type.  Default is 'k',
  884.                     highlighted keywords on.
  885.  
  886.      -l{6|8}        Line Spacing.  The 'l' option specifies the number
  887.                     of lines per inch to print.  The 'l' must be
  888.                     followed by a 6 or an 8.  Ensure that the proper
  889.                     printer codes have been defined in the SOURCE.PRT
  890.                     file for the eight lines per inch option to work. 
  891.                     Default is 'l6', six lines per inch.
  892.  
  893.      -L[#,]#        Block Indenting Level.  The 'L' option specifies
  894.                     how to indent the block trace lines if the 'b'
  895.                     option is used.  Normally the block trace lines
  896.                     are drawn adjacent to the block beginning.  The
  897.                     'L' option allows you to specify the equivalent of
  898.                     tab stops for the block levels.  The first, and
  899.                     optional, parameter to the 'L' option specifies
  900.                     the first column to place block level one in.  The
  901.                     second, required, parameter specifies the indent
  902.                     size.  Example:  'L1,3' will cause block level 1
  903.                     to be shown in column 1, level 2 in column 4,
  904.                     level 3 in column 7, etc.  These levels are used
  905.                     regardless of the actual column the block is in. 
  906.                     The starting column should almost always be 1
  907.                     since typically the outer most procedure blocks
  908.                     are in column one.  The indent size should not be
  909.                     any larger than the tab size.  Doing so could
  910.                     cause the block line to be drawn farther out than
  911.                     the block.  Specifying an indent size of 0 results
  912.                     in the default action of printing the block line
  913.                     adjacent to the block.  Default is 'L0,0'.
  914.  
  915.      -m{i|a}[v][r]  Include Files.  The 'm' option specifies what to
  916.                     do when SOURCE finds a reference to an include
  917.                     file.  The 'm' must be followed by an 'i' or an
  918.                     'a'.  The 'i' tells SOURCE to ignore the include
  919.                     file.  The 'a' tells SOURCE to print the include
  920.  
  921.                                      14
  922.                                    SOURCE
  923.  
  924.                     file as if it was a file specified on the command
  925.                     line.  The 'i' or 'a' may optionally be followed
  926.                     by a 'v' and/or an 'r'.  The 'v' causes SOURCE to
  927.                     ask for verification before printing the include
  928.                     file.  The 'v' is only needed if both the 'q' and
  929.                     the 'v' options are off.  If either is on, you
  930.                     will be asked anyway.  The 'r' is used to report
  931.                     include files that could not be found on the
  932.                     include paths.  See the 'M' option for more on
  933.                     include paths.  The include file will be printed
  934.                     under the same options as the master file.  The
  935.                     printing of include files is recursive.  In other
  936.                     words, if a reference is found to an include file
  937.                     inside an include file, the second will also be
  938.                     printed.  For this option to work, SOURCE must
  939.                     know what language the file is written in.  This
  940.                     is done by using the filename extension as defined
  941.                     in the SOURCE.LNG file or the 'x' option may be
  942.                     used to force a specific language.  The default is
  943.                     'mi', do not print include files.
  944.  
  945.      -M "path"      Include Search Path.  The 'M' option is used to
  946.                     specify additional directories to search when an
  947.                     include file is found.  See the 'm' option for
  948.                     more on printing include files.  These directories
  949.                     are searched prior to the directories specified in
  950.                     the "include" section of the language definition. 
  951.                     To specify more than one directory, separate them
  952.                     with a space.  Do not use a semicolon on the
  953.                     command line since DOS treats the semicolon as a
  954.                     command separator.  If you specify two or more
  955.                     directories, use must enclose them in double
  956.                     quotes because of the space.  The default is 'M',
  957.                     no additional paths to search.
  958.  
  959.      -n[-]          Line Numbering.  The 'n' option is used to specify
  960.                     whether line numbers will be shown or not.  Line
  961.                     numbers are shown in the format specified in the
  962.                     'N' option.  The 'n' may be followed by '-'.  The
  963.                     'n' option alone turns on line numbering, the
  964.                     minus turns it off.  Default is 'n', line
  965.                     numbering on.
  966.  
  967.      -N [beg]#[end] Line Number Format.  The 'N' option specifies the
  968.                     size and format of line numbers.  The value of #
  969.                     must be a number between 1 and 9.  The terms "beg"
  970.                     and "end" represent literal text that may be shown
  971.                     before and after the line numbers.  For example,
  972.                     if you want four digit line numbers within square
  973.                     brackets, you would specify the option as 'N[4]'. 
  974.                     This would result in [   1], [   2], etc., being
  975.                     printed.  Another example would be if you wanted
  976.                     to specify 'N04:', which is the default, and this
  977.                     would result in the line numbers being printed as
  978.                     0001:, 0002:, and so on.  
  979.  
  980.                                      15
  981.                                    SOURCE
  982.  
  983.                     The line numbers are left padded with spaces.  If
  984.                     you prefer the number to be left padded with
  985.                     zeros, precede the number with a zero.  For
  986.                     example:  'N4' will cause    1,    2, entering
  987.                     'N04' will cause 0001, 0002, etc.  Both the
  988.                     'begin' and 'end' text are optional.  If there is
  989.                     no 'end' text, the source code will be adjacent to
  990.                     the line number.  To avoid this, you may wish to
  991.                     specify 'N"4 "'.  The space inside the double
  992.                     quotes will print after each line number.  
  993.  
  994.                     Specifying a value for the number of digits that
  995.                     is too small for the number of lines in the file
  996.                     to be printed will result in the line numbers
  997.                     wrapping around.  For example, if you specify N01
  998.                     and have 19 lines, line 10 would show up as 0, and
  999.                     line 11 would become 1.  This wrapping holds true
  1000.                     for any size specified.  If your code typically
  1001.                     has less than 1000 lines, specify 3 for the value
  1002.                     of #, less than 10,000 lines, specify 4.  The
  1003.                     default is 'N04:' which will produce 0001:, 0002:,
  1004.                     etc.
  1005.  
  1006.      -o{l|p}        Page Orientation.  The 'o' option specifies the
  1007.                     page orientation.  This will probably only work on
  1008.                     laser printers since most dot matrix printers
  1009.                     cannot print in landscape.  The 'o' must be
  1010.                     followed by 'l' or 'p'.  The 'l' indicates
  1011.                     landscape (sideways) printing and the 'p' is
  1012.                     portrait (normal).  The landscape option requires
  1013.                     that the 'landscape' field be filled in in the
  1014.                     SOURCE.PRT file.  Default is 'op', portrait.
  1015.  
  1016.      -O{a|e|o|b}    Page Output.  The 'O' option specifies what pages
  1017.                     of the source file to print.  The 'a' parameter
  1018.                     specifies that all pages are to be printed.  The
  1019.                     'e' parameter specifies that only the even
  1020.                     numbered pages are to be printed.  The 'o'
  1021.                     parameter specifies that only the odd numbered
  1022.                     pages are to be printed.  The 'b' parameter will
  1023.                     first print the odd numbered pages, ask for a key
  1024.                     press, then print the even numbered pages.  This
  1025.                     pause allows you to go to the printer and re-feed
  1026.                     the paper upside down for manual duplex printing. 
  1027.                     Once the paper has been replaced, press any key
  1028.                     for the even pages to print.  Keep in mind that
  1029.                     the odd pages cannot simply be turned over and
  1030.                     placed back in the sheet feeder.  You must reverse
  1031.                     the order so page one is on top of the pile when
  1032.                     turned over.  One way to avoid this on some laser
  1033.                     printers is to open the back door.  This will
  1034.                     result in the pages being stacked in the proper
  1035.                     order.  
  1036.  
  1037.  
  1038.  
  1039.                                      16
  1040.                                    SOURCE
  1041.  
  1042.                     The terms 'odd' and 'even' for page numbers are
  1043.                     based on the 'I' option, not the 'J' option. 
  1044.                     Example:  If you specify "-I2 -J5 -Oo" to print
  1045.                     starting with physical page 2, but show page
  1046.                     numbers starting with 5, and print the "odd"
  1047.                     pages, physical pages 3, 5, 7, etc. will come out. 
  1048.                     Though they will be numbered 6, 8, 10, etc.  This
  1049.                     happens because page 2 becomes 5, 3 becomes 6,
  1050.                     etc.  The default is 'Oa', all pages.
  1051.       
  1052.      -p{p|e|c}      Pitch.  The 'p' option indicates the character
  1053.                     pitch to print the files in.  The 'p' must be
  1054.                     followed by 'p' (pica or 10 cpi), 'e' (elite or 12
  1055.                     cpi), or 'c' (compressed using your printers
  1056.                     compressed value, usually 15, 16.666, or 17).  If
  1057.                     your printer allows large pitch sizes such as 5
  1058.                     cpi, you could also use the compressed setting for
  1059.                     this.  See section 7 for more on setting the
  1060.                     compressed pitch value.  Default is 'pp', pica.
  1061.  
  1062.      -P{p|c|i}      Page Break.  The 'P' option tells SOURCE whether
  1063.                     to begin printing on a new 'p'age, or a new
  1064.                     'c'olumn when it encounters a form feed character,
  1065.                     or to 'i'gnore the form feed character all
  1066.                     together.  The 'P' option is also used to specify
  1067.                     the action to take when a page feed command is
  1068.                     found as specified in the language definition. 
  1069.                     Default is 'Pp', perform page break.
  1070.  
  1071.      -q[-]          Page Count Query.  The 'q' option causes SOURCE to
  1072.                     pre-scan each file and return the number of lines
  1073.                     in the file and how many pages (excluding any
  1074.                     banner pages) are required to print it based on
  1075.                     all other print options.  You are then asked to
  1076.                     confirm whether to print the file or not. 
  1077.                     Pressing 'Y' or 'y' will cause the file to be
  1078.                     printed.  Any other keystroke will prevent the
  1079.                     file from being printed.  Pressing the [Esc] key
  1080.                     will cause SOURCE to terminate.  The 'q' may be
  1081.                     followed by '-'.  The 'q' option alone turns on
  1082.                     the print statistics, the minus turns it off. 
  1083.                     Turning on the 'q' option automatically turns on
  1084.                     the 'v' (print verification) option.  The 'q'
  1085.                     option must be used for the '&pc' page header
  1086.                     command to print.  Default is 'q', show page
  1087.                     count.
  1088.  
  1089.      -Q[-]          Show Print Statistics.  The 'Q' option causes
  1090.                     SOURCE to print a line showing the total number of
  1091.                     files, pages, and lines printed.  The 'Q' may be
  1092.                     followed by '-'.  The 'Q' option alone prints the
  1093.                     statistics, the minus turns it off.  Default is
  1094.                     'Q', show print statistics.
  1095.  
  1096.  
  1097.  
  1098.                                      17
  1099.                                    SOURCE
  1100.  
  1101.      -r "output"    Redirect.  The 'r' option allows you to redirect
  1102.                     the output to a file or other device such as the
  1103.                     screen or another printer port.  The 'r' must be
  1104.                     followed by a filename or device name.  The file
  1105.                     or device name is not case sensitive.  Example
  1106.                     devices would be "LPT1", "PRN", or "COM2".  You
  1107.                     may even specify "CON" to send the output to the
  1108.                     screen.  When specifying a file, enter as much of
  1109.                     the full path name as is needed.  You may specify
  1110.                     another drive or directory.  You may specify
  1111.                     wildcards in the filename.  This allows you to do
  1112.                     things like:
  1113.  
  1114.                          SOURCE *.c -r*.prn
  1115.  
  1116.                     This will result in each 'C' file being output to
  1117.                     its own '.prn' file.  The wildcards act just like
  1118.                     they would in a DOS COPY command.  If the
  1119.                     specified file already exists, SOURCE will act as
  1120.                     specified by the 'a' option.  If more than one
  1121.                     file being printed is to be redirected to the same
  1122.                     output file, the latter ones will be appended to
  1123.                     the first.  Default is 'r lpt1', output to printer
  1124.                     port one.
  1125.  
  1126.      -s{1|2|3|4}    Column Count.  The 's' option specifies the number
  1127.                     of columns to print per page.  The 's' must be
  1128.                     followed by a 1, 2, 3, or 4.  It is recommended
  1129.                     that compressed landscape printing be used with
  1130.                     two or more columns.  Using two columns in 10
  1131.                     pitch, portrait print, leads to some difficult to
  1132.                     read output.  Default is 's1', one column per
  1133.                     page.
  1134.  
  1135.      -S[-]          Show Column Separator.  The 'S' option is used in
  1136.                     conjunction with the 's' option.  When you specify
  1137.                     more than one column, the columns are separated by
  1138.                     a vertical line.  The 'S' option allows you to
  1139.                     tell SOURCE whether to display this vertical line
  1140.                     or not.  The 'S' may be followed by '-'.  The 'S'
  1141.                     alone turns the line on, the minus turns it off. 
  1142.                     Default is 'S', line on.
  1143.  
  1144.      -t[#,]#        Tab Stop [Start and] Size.  The 't' option allows
  1145.                     you to specify how many spaces a tab character
  1146.                     should be printed as and optionally specify the
  1147.                     first tab column.  The 't' may be followed by a
  1148.                     number from one to the line length.  This optional
  1149.                     number represents the first tab column.  If used,
  1150.                     this number must be followed by a comma.  If not
  1151.                     specified, the default start column is column one. 
  1152.                     Next, the 't' must be followed by a number from 0
  1153.                     to 8.  This required number specifies the tab
  1154.                     size.  Specifying a size of zero is equivalent to
  1155.                     having all tabs removed from the file.  Default is
  1156.  
  1157.                                      18
  1158.                                    SOURCE
  1159.  
  1160.                     't8', eight spaces per tab stop starting from
  1161.                     column one.
  1162.  
  1163.      -T#            Truncate Line.  The 'T' option is used to print
  1164.                     only the first '#' characters per line. 
  1165.                     Specifying zero results on no line truncation. 
  1166.                     Default is 'T0', no line truncation.
  1167.  
  1168.      -u "name"      Use Named Configuration.  The 'u' option is used
  1169.                     to specify a named configuration from within the
  1170.                     SOURCE.CFG file.  See section 6.2 for more on
  1171.                     named configurations.  The 'u' must be followed by
  1172.                     a configuration name that has been defined in
  1173.                     SOURCE.CFG.  The name is not case sensitive.  No
  1174.                     default.
  1175.  
  1176.      -v[-]          Print Verification.  The 'v' option is used to ask
  1177.                     the user to confirm the printing of each file. 
  1178.                     This would most likely be used in conjunction with
  1179.                     wildcards in the filename.  For example, you want
  1180.                     to print all but one or two files in a directory. 
  1181.                     Specify "*.*/v" on the command line to select all
  1182.                     the files.  SOURCE will then ask you to confirm
  1183.                     the printing of each file.  Just press 'Y' or 'y'
  1184.                     for the ones you want to print.  Any other key
  1185.                     stroke other than 'Y' or 'y' will be the same as
  1186.                     no.  Pressing the [Esc] key will cause SOURCE to
  1187.                     terminate.  The 'v' option is automatically turned
  1188.                     on when the 'q' option is turned on.  The 'v'
  1189.                     option may be followed by '-'.  The 'v' option
  1190.                     alone turns on the print verify, the minus turns
  1191.                     it off.  Default is 'v-', do not ask about each
  1192.                     file.
  1193.  
  1194.      -w#            White Space.  The 'w' option is used to specify
  1195.                     the number of blank lines printed between the
  1196.                     header/footer and the first/last line of text of
  1197.                     the file on the page.  The 'w' must be followed by
  1198.                     a value between 0 and 9.  Specifying zero will
  1199.                     result in no blank space.  See the 'h' and 'H'
  1200.                     options for more on user definable headers and
  1201.                     footers.  Default is 'w1', one line.
  1202.  
  1203.      -W[-]          Word Wrap.  The 'W' option specifies whether to
  1204.                     wrap long lines or to truncate them.  The 'W' may
  1205.                     be followed by '-'.  The 'W' option alone turns on
  1206.                     word wrapping, the minus truncates the lines. 
  1207.                     Default is 'W', word wrap on.
  1208.  
  1209.      -x "language"  Force Language.  The 'x' option allows you to tell
  1210.                     SOURCE the language of a file regardless of its
  1211.                     extension.  This option is useful only when using
  1212.                     the 'b', 'c', or 'k' options (block grouping and
  1213.                     comment or keyword highlighting).  The 'x' must be
  1214.                     followed by a language name defined in SOURCE.LNG. 
  1215.  
  1216.                                      19
  1217.                                    SOURCE
  1218.  
  1219.                     The name is not case sensitive.  For example, if
  1220.                     you have a file with a 'bak' extension that really
  1221.                     is a Pascal program, by following the file with
  1222.                     the '-xPascal' option, SOURCE will treat the file
  1223.                     as Pascal code so comments and blocks print
  1224.                     correctly.  This assumes that there is a
  1225.                     definition for 'Pascal' in the SOURCE.LNG file. 
  1226.                     Default is none (use extension).
  1227.  
  1228.      -y[-]          Sound.  The 'y' option determines whether the
  1229.                     speaker will emit a bell or buzz sound when
  1230.                     prompts or errors occur.  This option is not
  1231.                     recognized as a local option.  The 'y' may be
  1232.                     followed by '-'.  The 'y' option alone turns on
  1233.                     sound, the minus turns them off.  Default is 'y-',
  1234.                     sound off.
  1235.  
  1236.      -z "list"      Ignore These Extensions.  The 'z' option is used
  1237.                     to tell SOURCE what files to ignore during
  1238.                     wildcard expansion.  For example, if you run
  1239.                     SOURCE with "*.*", you will have a mess at your
  1240.                     printer when it tries to print executables and
  1241.                     object code!  You could specify the 'v' option
  1242.                     each time and say no to files with ".exe" or
  1243.                     ".obj" extensions, or you could use the 'z' option
  1244.                     to tell SOURCE to automatically ignore the ".exe"
  1245.                     and ".obj" extensions every time.  The syntax for
  1246.                     the 'z' option is the list of extensions
  1247.                     (including the period) between a pair of double
  1248.                     quotes (if you place a space between each).  The
  1249.                     list is not case sensitive.  To continue the
  1250.                     example, specify the 'z' option as 'z ".exe
  1251.                     .obj"'.  You may specify as many extensions as you
  1252.                     like as long as all are specified with one 'z'
  1253.                     option.  Using two 'z' options will cause the
  1254.                     first one to be ignored.  Default is 'z ".exe .com
  1255.                     .sys .obj"'.
  1256.  
  1257.      Below is a list of the command line options broken out by
  1258.      category.
  1259.  
  1260.      Page Format:
  1261.      -p             Pitch.
  1262.      -o             Page Orientation.
  1263.      -s             Column Count.
  1264.      -S             Show Column Separator.
  1265.      -l             Line Spacing.
  1266.      -g             Graphics.
  1267.      -e             Escape Codes.
  1268.      -P             Page Break.
  1269.      -E             Page Margins.
  1270.  
  1271.      Page Layout:
  1272.      -t             Tab Stop Start and Size.
  1273.      -n             Line Numbering.
  1274.  
  1275.                                      20
  1276.                                    SOURCE
  1277.  
  1278.      -N             Line Number Format.
  1279.      -h             Header Page.
  1280.      -H             Header Definition.
  1281.      -w             White Space.
  1282.      -B             Banner.
  1283.      -W             Word Wrapping.
  1284.      -T             Line Truncation.
  1285.  
  1286.      Language Features:
  1287.      -b             Block Grouping.
  1288.      -L             Block Level Indenting.
  1289.      -c             Comment Highlighting.
  1290.      -k             Keyword Highlighting.
  1291.      -m             Include Files.
  1292.      -M             Include Search Path.
  1293.      -x             Force Language.
  1294.  
  1295.      File Selection:
  1296.      -i             Initial Line.
  1297.      -f             Final Line.
  1298.      -I             Initial Page.
  1299.      -F             Final Page.
  1300.      -j             First Line Number.
  1301.      -J             First Page Number.
  1302.      -q             Page Count Query.
  1303.      -v             Print Verification.
  1304.      -z             Ignore These Extensions.
  1305.  
  1306.      Output:
  1307.      -r             Redirect.
  1308.      -a             Append/Overwrite.
  1309.      -d             Select Printer.
  1310.      -O             Output Pages.
  1311.  
  1312.      Miscellaneous:
  1313.      -?             Help.
  1314.      -y             Sound.
  1315.      -u             Use Named Configuration.
  1316.      -Q             Show Print Statistics.
  1317.  
  1318.      6    SOURCE.CFG
  1319.  
  1320.      The SOURCE.CFG file is used to store groups of configuration
  1321.      options that may be used by SOURCE.  Among these groups are a set
  1322.      of default options.  These default options are seen by running
  1323.      SOURCE with the '-?' global option.  These default options, as
  1324.      initially defined, are actually the same defaults hard coded
  1325.      within SOURCE itself.
  1326.  
  1327.      6.1  SOURCE.CFG Location
  1328.  
  1329.      SOURCE.CFG is actually not needed.  If SOURCE can not find
  1330.      SOURCE.CFG, it will fall back on the built in defaults and
  1331.      continue to work fine.  SOURCE.CFG can be located in many
  1332.      different places.  By default, you should place a copy in the
  1333.  
  1334.                                      21
  1335.                                    SOURCE
  1336.  
  1337.      same directory as SOURCE.EXE (from now on referred to as the
  1338.      SOURCE directory).  With this setup, running SOURCE from any
  1339.      directory will cause SOURCE to use the defaults defined in
  1340.      SOURCE.CFG in the SOURCE directory.
  1341.  
  1342.      In addition to placing SOURCE.CFG in the SOURCE directory, you
  1343.      may also place other copies in any other directory you wish.  For
  1344.      example, you have a 'prog' directory on your hard disk.  If you
  1345.      place another copy of SOURCE.CFG in 'prog' and run SOURCE while
  1346.      your default directory is 'prog', SOURCE will use the SOURCE.CFG
  1347.      file in the 'prog' directory instead of the SOURCE directory.  By
  1348.      tailoring the SOURCE.CFG file to the files in 'prog', you can
  1349.      minimize the amount of command line options you need to specify. 
  1350.      The whole point to allowing this kind of flexibility is that you
  1351.      might be working on different projects that require different
  1352.      printing styles.  By placing tailored SOURCE.CFG files in the
  1353.      different directories, you can easily accomplish the diverse
  1354.      printing needs.
  1355.  
  1356.      6.2  Named Configuration Options
  1357.  
  1358.      If you have looked at the contents of SOURCE.CFG, you will notice
  1359.      that there seems to be more than just defaults defined in there. 
  1360.      SOURCE.CFG can actually store up to fifty sets of configuration
  1361.      options.  The first of which (as supplied) is the default
  1362.      options.  These different sets of options are referred to as
  1363.      named configuration options.  The supplied defaults are actually
  1364.      a named configuration option titled 'Default'.  SOURCE
  1365.      automatically looks for 'Default' and loads the options in if
  1366.      found.  In addition to the 'Default' setup, you may define 49
  1367.      more of your own design.  If for some reason you do not want the
  1368.      defaults loaded, rename 'Default' to something else.  You may
  1369.      then refer to the defaults explicitly by using the 'u' option on
  1370.      the command line.  See section 5 for more information on
  1371.      selecting named configurations from the command line using the
  1372.      'u' option.
  1373.  
  1374.      The idea behind named configurations allows you to define a
  1375.      commonly used, but cumbersome, set of configuration options into
  1376.      a simple, single command line option.  A common use for them
  1377.      might be on a LAN where each user has their own favorite set of
  1378.      defaults.  The SOURCE.CFG file could contain one set for each
  1379.      user using their name or initials to name the options.  On the
  1380.      command line, simply specify "-u name" and all the options
  1381.      defined as "name" in SOURCE.CFG will be used.  Another
  1382.      circumstance could be to use named options when you are using
  1383.      SOURCE with multiple printers.  If you have "printer1" on "lpt1"
  1384.      and "printer2" on "com3", you could add two named configurations,
  1385.      "p1" and "p2".  "p1" would have '-d printer1 -r lpt1' and "p2"
  1386.      would have '-d printer2 -r com3'.  You could also add the 'g'
  1387.      option if one printer could print the IBM line drawing characters
  1388.      and one could not.  Typing 'source -u p1' at the command line is
  1389.      easier than 'source -d printer1 -r lpt1 -g'.  One other
  1390.      possibility would be if you wished to print source code in
  1391.      different languages in different formats.
  1392.  
  1393.                                      22
  1394.                                    SOURCE
  1395.  
  1396.      The named set of options may also contain a 'u' option.  This
  1397.      allows for nested definitions.  As an example, let's say you have
  1398.      two named configurations, "name1" and "name2".  If "name1"
  1399.      contains '-u name2', "name1" will pull in the options defined in
  1400.      "name2".  The result of using "name1" will be all the options in
  1401.      "name1" and all the options in "name2" being used.
  1402.  
  1403.      6.3  SOURCE.CFG Format
  1404.  
  1405.      The format of the SOURCE.CFG file is simple.  A named
  1406.      configuration begins with the key word "begin" followed by a
  1407.      name.  This name can contain any characters you can type at the
  1408.      DOS prompt.  I recommend descriptive names that indicate what the
  1409.      options represent.  Spaces are not allowed in the name.  The only
  1410.      limit is the full name must be 20 characters or less.  After the
  1411.      "begin" line, enter any set of options you like.  There are two
  1412.      ways of entering the options.  The easiest to read is to place
  1413.      one command per line.  Each command must be preceded by a hyphen. 
  1414.      Example:
  1415.  
  1416.      -t3
  1417.      -pp
  1418.  
  1419.      The second method allows more than one command per line.  This is
  1420.      identical to global options on the command line.  Simply separate
  1421.      the commands by at least one space.  Again, each command must be
  1422.      preceded by a hyphen.  Example:
  1423.  
  1424.      -l8  -s2
  1425.  
  1426.      You may also enter the commands using any combination of the two
  1427.      methods.  Example:
  1428.  
  1429.      -q  -i5 -f100
  1430.      -z ".exe .obj .sys"
  1431.  
  1432.      After all options have been specified, enter the key word "end"
  1433.      on a line by itself to signal the end of the named definition. 
  1434.      You may define up to 20 named configurations.  A full definition
  1435.      would look as follows:
  1436.  
  1437.           begin Test
  1438.           -q -F2
  1439.           end
  1440.  
  1441.      6.4  Commenting SOURCE.CFG
  1442.  
  1443.      You may place comments in the SOURCE.CFG file by beginning a line
  1444.      with a semicolon ( ; ).  All text on that line will be ignored by
  1445.      SOURCE.  Do not place comments on lines with options.  The
  1446.      comment must go on a line by itself.  Example:
  1447.  
  1448.      ; This is a valid comment
  1449.      -b -cb   ; This is not a valid comment - must be on own line
  1450.  
  1451.  
  1452.                                      23
  1453.                                    SOURCE
  1454.  
  1455.      6.5  Modifying SOURCE.CFG
  1456.  
  1457.      I recommend you modify the 'Default' named option in SOURCE.CFG
  1458.      to suit your most common needs.  This will result in having to
  1459.      specify little on the command line other than the filenames to
  1460.      print.  If you need to print a file slightly different one time,
  1461.      specify only the options required for the difference.  Add other
  1462.      named options for other commonly used configurations like those
  1463.      mentioned above.  This allows you to use very different print
  1464.      formats with minimal command line typing.
  1465.  
  1466.      One common change to the defaults would be to specify a different
  1467.      printer port.  Initially, SOURCE assumes printer port one, LPT1:. 
  1468.      If you are using a serial printer on a COM port or another
  1469.      printer port, change the default setting for the 'r' option. 
  1470.      Replace the word 'lpt1' with 'com1' or 'lpt2' or whatever is
  1471.      appropriate for you.
  1472.  
  1473.      7    SOURCE.PRT
  1474.  
  1475.      This file allows you to define any printer configuration you may
  1476.      have.  Only one copy of SOURCE.PRT is used and this must reside
  1477.      in the same directory as SOURCE.EXE.  This file is required and
  1478.      SOURCE will not run if not found.  SOURCE.PRT can contain printer
  1479.      definitions for up to 20 different printers, though I doubt you
  1480.      will ever need that many.  Once you define your printer, you can
  1481.      delete all other definitions if you like.  However, if you have
  1482.      more than one printer, leave all the necessary definitions.
  1483.  
  1484.      7.1  Default Printer
  1485.  
  1486.      If you have more than one printer defined, you must make one the
  1487.      default.  This can be done automatically the first time you run
  1488.      SOURCE.  If you would like to change that default at a later
  1489.      time, you must manually edit the SOURCE.PRT file.  To make a
  1490.      printer the default, place the keyword "default" after the
  1491.      printer name.  Example:  'begin HPLJII+ default'.  If you specify
  1492.      more than one default, the fist one will be chosen.  Remember you
  1493.      can use the 'd' option to select a printer other than the default
  1494.      if needed.  If you only have one printer defined in SOURCE.PRT
  1495.      you do not need to specify the keyword "default".
  1496.  
  1497.      7.2  SOURCE.PRT Format
  1498.  
  1499.      Similar to SOURCE.CFG, each definition in SOURCE.PRT begins with
  1500.      the keyword 'begin' followed by a name.  The name may be made up
  1501.      of any characters you can type at the DOS prompt up to 20
  1502.      characters.  The name may not contain spaces.  The printer
  1503.      definition ends with the keyword 'end' on a line by itself.  In
  1504.      between are the lines specifying your printer setup.  The syntax
  1505.      of each line is a field name, a colon, and the value you enter
  1506.      for that field.  Each line can contain only one field.  
  1507.  
  1508.      For those fields that require a printer escape sequence, you can
  1509.      enter the codes as literal characters or by entering the decimal
  1510.  
  1511.                                      24
  1512.                                    SOURCE
  1513.  
  1514.      value in square brackets.  You may also enter the code as a
  1515.      combination of both.  For example, the reset code on a Hewlett
  1516.      Packard Laser Jet is [Esc]E.  You might not be able to enter a
  1517.      literal escape character in your editor.  The solution is to use
  1518.      the decimal value in square brackets.  [Esc] is ASCII value 27. 
  1519.      The 'E' can be entered literally.  The two codes together would
  1520.      be entered into the reset field as:  [27]E.  Since the square
  1521.      brackets are being used as special characters by SOURCE, you may
  1522.      not enter them as literal characters in the printer code.  If
  1523.      your code needs the characters '[' or ']', enter the decimal
  1524.      value in square brackets.  The left bracket '[' becomes [91] and
  1525.      the right bracket ']' becomes [93].  The value inside the bracket
  1526.      must be a decimal number from 1 to 255.  If an ASCII character of
  1527.      32 (space) is required, you may enter a literal space or [32].
  1528.  
  1529.      A list of the fields and a description of each is as follows:
  1530.  
  1531.      page width:    This field is the physical page width in inches. 
  1532.                     This will typically be 8.5 for standard letter
  1533.                     sized paper.  If you are using wide computer
  1534.                     paper, this could be 14.  This field is required.
  1535.  
  1536.      page length:   This field is the physical page length in inches. 
  1537.                     Normal letter size paper would be 11.  Legal size
  1538.                     paper would be 14.  This field is required.
  1539.  
  1540.      top margin:    Indicates the top margin in inches.  The first
  1541.                     printed line will be placed this far from the top
  1542.                     of the page.  A standard half inch margin would be
  1543.                     .5.  This value must be greater than or equal to
  1544.                     the top edge.  This field is required.
  1545.  
  1546.      bottom margin: Indicates the bottom margin in inches.  The last
  1547.                     line printed will be this far from the bottom of
  1548.                     the page.  This value must be greater than or
  1549.                     equal to the bottom edge.  This field is required.
  1550.  
  1551.      left margin:   This is the left margin in inches.  The left most
  1552.                     characters will be this far from the left edge of
  1553.                     the paper.  This value must be greater than or
  1554.                     equal to the left edge.  This field is required.
  1555.  
  1556.      right margin:  This is the right margin in inches.  The right
  1557.                     most characters will be this far from the right
  1558.                     edge of the paper.  This value must be greater
  1559.                     than or equal to the right edge.  This field is
  1560.                     required.
  1561.  
  1562.      top edge:      The top edge is used to define the physical
  1563.                     limitation of the printer to print at the top of
  1564.                     the page.  Laser printers typically are set with a
  1565.                     half inch limit at the top.  By entering .5 here,
  1566.                     the margin specified in 'top margin' will come out
  1567.                     correctly.  This field is required.
  1568.  
  1569.  
  1570.                                      25
  1571.                                    SOURCE
  1572.  
  1573.      bottom edge:   The bottom edge is used to define the physical
  1574.                     limitation of the printer to print at the bottom
  1575.                     of the page.  Laser printers typically are set
  1576.                     with a half inch limit at the bottom.  By entering
  1577.                     .5 here, the margin specified in 'bottom margin'
  1578.                     will come out correctly.  This field is required.
  1579.  
  1580.      left edge:     The left edge is used to define the physical
  1581.                     limitation of the printer to print at the left
  1582.                     edge of the page.  Laser printers typically cannot
  1583.                     print on the first quarter inch of the left edge. 
  1584.                     By entering .25 here, the margin specified in
  1585.                     'left margin' will come out correctly.  The exact
  1586.                     value entered may be slightly different.  Try .2
  1587.                     or .3.  Experiment with the proper value to set
  1588.                     your printer up correctly.  This field is
  1589.                     required.
  1590.  
  1591.      right edge:    The right edge is used to define the physical
  1592.                     limitation of the printer to print at the right
  1593.                     edge of the page.  Laser printers typically cannot
  1594.                     print on the last quarter inch of the right edge. 
  1595.                     By entering .25 here, the margin specified in
  1596.                     'right margin' will come out correctly.  The exact
  1597.                     value entered may be slightly different.  Try .2
  1598.                     or .3.  Experiment with the proper value to set
  1599.                     your printer up correctly.  This field is
  1600.                     required.
  1601.  
  1602.      10 pitch:      This field is used to enter the escape sequence
  1603.                     used by your printer to print text at ten
  1604.                     characters per inch.  Enter the sequence exactly
  1605.                     as shown in your printer manual including case. 
  1606.                     Used when the 'pp' option is used.
  1607.  
  1608.      12 pitch:      This field is used to enter the escape sequence
  1609.                     used by your printer to print text at 12
  1610.                     characters per inch.  Enter the sequence exactly
  1611.                     as shown in your printer manual including case. 
  1612.                     This field is required to use this feature.  Used
  1613.                     when the 'pe' option is used.
  1614.  
  1615.      compressed:    This field is used to enter the escape sequence
  1616.                     used by your printer to print text in compressed
  1617.                     mode.  This is usually 15, 16.66, or 17.  You may
  1618.                     even enter the code for enlarged print such as 5
  1619.                     cpi.  Enter the sequence exactly as shown in your
  1620.                     printer manual including case.  Make sure the size
  1621.                     of the print is specified in the 'comp size'
  1622.                     field.  This field is required to use this
  1623.                     feature.  Used when the 'pc' option is used.
  1624.  
  1625.      comp size:     This field is used to specify the characters per
  1626.                     inch your printer will print while in compressed
  1627.                     mode.  Typically this value will be 15, 16.666, or
  1628.  
  1629.                                      26
  1630.                                    SOURCE
  1631.  
  1632.                     17 (or even 5 for enlarged print).  This field is
  1633.                     required to print in compressed mode.  Used when
  1634.                     the 'pc' option is used.
  1635.  
  1636.      underline on:  This is the printer escape sequence used to print
  1637.                     comments or keywords when the 'c' or 'k' option is
  1638.                     set to 'u'.  This code should be set to turn on
  1639.                     underlined print.  This code is also used on page
  1640.                     headers or footers.  DO NOT use a code that prints
  1641.                     in a different size font like expanded or double
  1642.                     height.  This will cause the file to print
  1643.                     incorrectly.  Whatever code is used must not
  1644.                     change the current print size.  This field is
  1645.                     required to use this feature.
  1646.  
  1647.      underline off: This is the printer escape sequence used to turn
  1648.                     off the code used by 'underline on'.  This field
  1649.                     is required to use this feature.
  1650.  
  1651.      bold on:       This is the printer escape sequence used to print
  1652.                     comments or keywords when the 'c' or 'k' option is
  1653.                     set to 'b'.  This code should be set to turn on
  1654.                     bold print.  DO NOT use a code that prints in a
  1655.                     different size font like expanded or double
  1656.                     height.  This will cause the file to print
  1657.                     incorrectly.  Whatever code is used must not
  1658.                     change the current print size.  This field is
  1659.                     required to use this feature.
  1660.  
  1661.      bold off:      This is the printer escape sequence used to turn
  1662.                     off the code used by 'bold on'.  This field is
  1663.                     required to use this feature.
  1664.  
  1665.      italic on:     This is the printer escape sequence used to print
  1666.                     comments or keywords when the 'c' or 'k' option is
  1667.                     set to 'i'.  This code should be set to turn on
  1668.                     italic print.  DO NOT use a code that prints in a
  1669.                     different size font like expanded or double
  1670.                     height.  This will cause the file to print
  1671.                     incorrectly.  What ever code is used must not
  1672.                     change the current print size.  This field is
  1673.                     required to use this feature.
  1674.  
  1675.      italic off:    This is the printer escape sequence used to turn
  1676.                     off the code used by 'italic on'.  This field is
  1677.                     required to use this feature.
  1678.  
  1679.      other on:      This is the printer escape sequence used to print
  1680.                     comments or keywords when the 'c' or 'k' option is
  1681.                     set to 'o'.  This code could be almost anything
  1682.                     your printer can do.  Examples are inverse or
  1683.                     outline.  DO NOT use a code that prints in a
  1684.                     different size font like expanded or double
  1685.                     height.  This will cause the file to print
  1686.                     incorrectly.  What ever code is used must not
  1687.  
  1688.                                      27
  1689.                                    SOURCE
  1690.  
  1691.                     change the current print size.  This field is
  1692.                     required to use this feature.
  1693.  
  1694.      other off:     This is the printer escape sequence used to turn
  1695.                     off the code used by 'other on'.  This field is
  1696.                     required to use this feature.
  1697.  
  1698.      init:          This code is sent to the printer before the first
  1699.                     file is printed.  This should contain all required
  1700.                     printer initialization codes to setup your
  1701.                     printer.  Examples would be the initialize printer
  1702.                     code, character set selection (not pitch size),
  1703.                     and print quality (draft, NLQ, etc.).  There
  1704.                     should be nothing in here for selecting pitch or
  1705.                     page orientation since this will be done using the
  1706.                     other codes specific to those settings.  This is
  1707.                     not required.
  1708.  
  1709.      reset:         This code is sent to the printer after the last
  1710.                     file is sent.  This can be blank.  This may be
  1711.                     used to place the printer back into the mode it
  1712.                     was prior to the "Init" code being sent.  This is
  1713.                     not required.
  1714.  
  1715.      portrait:      This is the code sent to the printer to set the
  1716.                     paper orientation to portrait - the usual way the
  1717.                     page is set.  This only applies to laser printers
  1718.                     since dot matrix printers cannot print any other
  1719.                     way using straight text printing (as opposed to
  1720.                     graphics).  This must be filled in if your printer
  1721.                     supports portrait and landscape printing.
  1722.  
  1723.      landscape:     This is the code sent to the printer to set the
  1724.                     paper orientation to landscape - sideways
  1725.                     printing.  This only applies to laser printers
  1726.                     since dot matrix printers cannot print landscape
  1727.                     without using graphics.  This must be filled in to
  1728.                     make use of the landscape printing feature.
  1729.  
  1730.      6 lpi:         This code is used to print the file at six lines
  1731.                     per inch.  This is the usual default for all
  1732.                     printers.  If your printer does not support eight
  1733.                     lines per inch than you may leave this blank,
  1734.                     otherwise this is required.  Used with the 'l6'
  1735.                     option.
  1736.  
  1737.      8 lpi:         This code is used to print the file at eight lines
  1738.                     per inch.  If your printer does not support eight
  1739.                     lines per inch than you may leave this blank,
  1740.                     otherwise this is required to use the feature. 
  1741.                     Used with the 'l8' option.
  1742.  
  1743.      There are many relationships between the values placed in the
  1744.      above fields.  The sum of the top and bottom margins must be less
  1745.      than the page length.  The sum of the left and right margins must
  1746.  
  1747.                                      28
  1748.                                    SOURCE
  1749.  
  1750.      be less than the page width.  All margins must be greater than or
  1751.      equal to their corresponding edge.  If you only have 10 pitch
  1752.      printing, you may leave all three pitch codes blank.  If you can
  1753.      only print at six lines per inch, you may leave both the six and
  1754.      eight lines per inch codes blank.
  1755.  
  1756.      Certain combinations of print options do not work together on
  1757.      some printers.  For example, Hewlett Packard laser jet printers
  1758.      will not print bold or italic while in compressed print.  If you
  1759.      specify -cb -pc on the command line (bold comments, compressed
  1760.      print) for a Laserjet printer, the comments will not be bold.
  1761.  
  1762.      7.3  Modifying Your Printer
  1763.  
  1764.      As delivered, the SOURCE.PRT file has only a few basic printers
  1765.      within it.  These may not fit your printer completely if at all. 
  1766.      To take full advantage of your printer's abilities, you can edit
  1767.      SOURCE.PRT by placing an entry for your printer within it.  To do
  1768.      so, either reuse an existing entry that is similar to your
  1769.      printer or copy the 'Generic' definition and rename the copy to
  1770.      match your printer name.  Once you have this done, open up your
  1771.      printer's reference manual to the section that describes all the
  1772.      features and their associated escape sequences.  Enter the codes
  1773.      you need into the proper fields and you will be ready to go.  It
  1774.      may take some trial and error to get everything perfect, but it
  1775.      can be done.
  1776.  
  1777.      8    SOURCE.LNG
  1778.  
  1779.      SOURCE.LNG contains the definitions for the language support
  1780.      features of SOURCE.  The five options are comment highlighting,
  1781.      keyword highlighting, code block grouping or tracing, include
  1782.      file printing, and page feed commands.  The SOURCE.LNG file
  1783.      details what makes a comment, a literal string and character,
  1784.      what represents a code block, the list of keywords, how to find
  1785.      an include file, and the list of page feed commands.
  1786.  
  1787.      8.1  SOURCE.LNG Location
  1788.  
  1789.      SOURCE.LNG is not a required file.  If SOURCE can not find
  1790.      SOURCE.LNG, it will ignore the use of the b, c, and k options and
  1791.      continue to work fine.  SOURCE.LNG can actually be located in
  1792.      many different places.  By default, you should place a copy in
  1793.      the same directory as SOURCE.EXE (from now on referred to as the
  1794.      SOURCE directory).  With this setup, running SOURCE from any
  1795.      directory will cause SOURCE to use the definitions in the
  1796.      SOURCE.LNG in the SOURCE directory.
  1797.  
  1798.      In addition to placing SOURCE.LNG in the SOURCE directory, you
  1799.      may also place other copies in any other directory you wish.  For
  1800.      example, you have a 'prog' directory on your hard disk.  If you
  1801.      place another copy of SOURCE.LNG in 'prog' and run SOURCE while
  1802.      your default directory is 'prog', SOURCE will use the SOURCE.LNG
  1803.      file in the 'prog' directory instead of the SOURCE directory.  By
  1804.  
  1805.  
  1806.                                      29
  1807.                                    SOURCE
  1808.  
  1809.      tailoring the SOURCE.LNG file to the files in 'prog', you can
  1810.      work with different dialects of the same language.
  1811.  
  1812.      The whole point to allowing this kind of flexibility is that you
  1813.      might be working on different projects that require different
  1814.      language definitions.  By placing tailored SOURCE.LNG files in
  1815.      the different directories, you can easily accomplish the diverse
  1816.      needs.
  1817.  
  1818.      8.2  SOURCE.LNG Format
  1819.  
  1820.      The format of SOURCE.LNG is similar to the other support files. 
  1821.      You begin a language definition with the keyword 'beginlang'
  1822.      followed first by the name of the language and then a list of
  1823.      filename patterns associated with the language.  The language
  1824.      name can be any characters you can type at the DOS prompt.  The
  1825.      name cannot contain spaces and may be up to 20 characters long. 
  1826.      The list of filename patterns is used to tell SOURCE to treat any
  1827.      file matching the pattern as a file of that language.  The file
  1828.      pattern may contain wild cards like those used in the 'DIR'
  1829.      command.  An example would be:  'beginlang C *.c *.h'.  This
  1830.      defines a language called "C".  Any file with the extension ".c"
  1831.      or ".h" would be treated as a "C" file.  You may specify up to 10
  1832.      patterns per language.
  1833.  
  1834.      The second line of the definition is a list of legal characters
  1835.      that may be found in identifiers and keywords.  Identifiers
  1836.      include variables and labels within a program.  These characters
  1837.      are used to tell SOURCE how to discern between two words in a
  1838.      program.  Most languages allow letter and numbers.  Some also
  1839.      allow some punctuation like underscores.  See your language
  1840.      reference.  It should detail the allowable characters.  The list
  1841.      of characters must be contiguous and on one line with no spaces. 
  1842.      You only need to specify either lower or upper case letters, not
  1843.      both.
  1844.  
  1845.      The language definition is completed with the keyword 'endlang'
  1846.      on a line by itself.  This may be followed by the keyword 'case'
  1847.      to indicate that the language is case sensitive and/or 'part' to
  1848.      indicate that keywords only need to match partially.  This is
  1849.      explained in detail below.  Any other keywords, or none at all,
  1850.      indicate that the language is case independent and keywords
  1851.      require a full match.  Example:  'endlang case' terminates the
  1852.      language definition and specifies case dependency.  'endlang' or
  1853.      'endlang nocase' indicate the end of a case independent language.
  1854.  
  1855.      The SOURCE.LNG file may contain up to twenty language
  1856.      definitions.  You only need those for which you have use, so feel
  1857.      free to delete unneeded languages from the supplied SOURCE.LNG
  1858.      file.
  1859.  
  1860.      8.3  Commenting SOURCE.LNG
  1861.  
  1862.      You may place comments in the SOURCE.LNG file by beginning a line
  1863.      with a semicolon (;).  All text on that line will be ignored by
  1864.  
  1865.                                      30
  1866.                                    SOURCE
  1867.  
  1868.      SOURCE.  Do not place comments within a language definition, only
  1869.      before the 'beginlang' line or after the 'endlang' line.
  1870.  
  1871.      8.4  Defining Language Specific Features
  1872.  
  1873.      8.4.1  Comments
  1874.  
  1875.      After the 'beginlang' line, you specify how comments are defined. 
  1876.      This begins with the line ':comment:'.  After the ':comment:'
  1877.      line, you specify three lines.  The first line is the begin
  1878.      comment command, the second is the end comment command.  The
  1879.      third line contains a number from zero to 80 or the letter 'B'. 
  1880.      If a number is specified, it indicates the column that the begin
  1881.      comment command must begin in.  A zero indicates that the comment
  1882.      may begin in any column.  If the letter 'B' is specified, it
  1883.      means that the begin comment marker may begin in any column but
  1884.      must be the first non white space character on the line.  An
  1885.      example for the 'C' language would be:
  1886.  
  1887.           :comment:
  1888.           /*                       <== Begin comment
  1889.           */                       <== End comment
  1890.           0                        <== Comment may be in any column
  1891.  
  1892.      You may specify more than one comment.  For example, Turbo Pascal
  1893.      allows the following:
  1894.  
  1895.           :comment:
  1896.           {
  1897.           }
  1898.           0
  1899.           (*
  1900.           *)
  1901.           0
  1902.  
  1903.      For languages such as BASIC where comments are terminated by the
  1904.      end of line, specify the begin command on the first line and
  1905.      leave the second line blank.  Example:
  1906.  
  1907.           :comment:
  1908.           REM
  1909.                                    <== This is a blank line
  1910.           0
  1911.  
  1912.      One of the few examples of specifying a non-zero column number
  1913.      would be for FORTRAN.  Comments in FORTRAN are specified by
  1914.      placing a 'C' in column one.  The definition for this would be:
  1915.  
  1916.           :comment:
  1917.           C                        <== Comments begin with a C
  1918.                                    <== Terminated by end-of-line
  1919.           1                        <== 'C' must be in column one
  1920.  
  1921.      An example of using the 'B' column position is dBASE.  The 'note'
  1922.      and '*' comment markers used for comments must be the first
  1923.  
  1924.                                      31
  1925.                                    SOURCE
  1926.  
  1927.      characters on the line (not necessarily column one).  The
  1928.      definition would be:
  1929.  
  1930.           :comment:
  1931.           *                        <== Comment begins with '*'
  1932.                                    <== Terminated by end-of-line
  1933.           B                        <== * must be first character
  1934.           note                     <== Comment begins with 'note'
  1935.                                    <== Terminated by end-of-line
  1936.           B                        <== 'n' must be first character
  1937.  
  1938.      Since blank lines are interpreted as part of the syntax, you may
  1939.      not leave blank lines within a language definition in the
  1940.      SOURCE.LNG file unless it is required as above.  You may define
  1941.      up to 10 comment marker pairs per language.
  1942.  
  1943.      8.4.2  String and Character Literals
  1944.  
  1945.      After defining the comments, you define what makes up literal
  1946.      strings and characters.  This is done just like comments.  You
  1947.      begin with the line ':string:'.  After this line, you enter two
  1948.      lines per string or character.  The first line contains the
  1949.      delimiter used to begin and end a literal string or character
  1950.      (typically a single or double quote).  The second line specifies
  1951.      an escape sequence.  This is the sequence (usually one character)
  1952.      used to allow the delimiter character to be used literally within
  1953.      a string or as a character.  'C' is a good example of this. 
  1954.      Strings are set in double quotes.  To place a double quote within
  1955.      a string, you must precede the double quote with a backslash ("He
  1956.      said \"Hello\"").  The definition would be as follows:
  1957.  
  1958.           :string:
  1959.           "                        <== String Delimiter
  1960.           \                        <== Escape Sequence
  1961.  
  1962.      Characters in 'C' are similar.  Literal characters are defined by
  1963.      single quotes.  To assign a literal single quote in 'C', you
  1964.      precede the literal quote with a backslash ('\'').  The
  1965.      definition would be:
  1966.  
  1967.           :string:
  1968.           '                        <== Character Delimiter
  1969.           \                        <== Escape Sequence
  1970.  
  1971.      For languages such as Pascal where strings are defined by single
  1972.      quotes and a literal single quote is specified by two single
  1973.      quotes ('It''s mine'), simply place the following definition:
  1974.  
  1975.           :string:
  1976.           '                        <== String & Character Delimiter
  1977.           '                        <== Escape Sequence
  1978.  
  1979.      For languages such as BASIC which do not allow you to place the
  1980.      string delimiter within the string, you would leave the second
  1981.      line blank.
  1982.  
  1983.                                      32
  1984.                                    SOURCE
  1985.  
  1986.      You may declare up to five pairs of delimiters per language.  The
  1987.      full string definition for 'C' would be:
  1988.  
  1989.           :string:
  1990.           "
  1991.           \
  1992.           '
  1993.           \
  1994.  
  1995.      8.4.3  Blocks
  1996.  
  1997.      After specifying the string definition, you must define what
  1998.      commands make up blocks.  The keywords defined here are used with
  1999.      the 'b' option to allow block grouping to work.  The definition
  2000.      begins with the keyword ':block:'.  Following are two lines per
  2001.      block.  The first line is the begin block command and the second
  2002.      line is the end block command.  For 'C', this is easy because all
  2003.      blocks are marked the same.  Blocks begin with a left curly brace
  2004.      and end with a right curly brace.  The definition would be:
  2005.  
  2006.           :block:
  2007.           {
  2008.           }
  2009.  
  2010.      For languages like Pascal, you may have numerous block pairs. 
  2011.      Example:
  2012.  
  2013.           :block:
  2014.           begin
  2015.           end
  2016.           record
  2017.           end
  2018.           case
  2019.           end
  2020.           repeat
  2021.           until
  2022.  
  2023.      For most languages, the keyword used to define a block must be
  2024.      entered in its entirety.  You can't specify 
  2025.  
  2026.           beg
  2027.           ...
  2028.           end
  2029.  
  2030.      in Pascal for example.  You must enter the whole keyword.  A
  2031.      counter example to this is the dBase programming language.  dBase
  2032.      allows you to enter only the first four letters of each keyword. 
  2033.      A 'while' loop could be entered as:
  2034.  
  2035.           do while                           do whil
  2036.           ...                 or             ...
  2037.           enddo                              endd
  2038.  
  2039.      For SOURCE to work with a language such as this, you must specify
  2040.      the "part" or "partial" keyword after the "endlang" keyword at
  2041.  
  2042.                                      33
  2043.                                    SOURCE
  2044.  
  2045.      the end of the language definition followed by the number of
  2046.      characters needed.  SOURCE will use this number when comparing
  2047.      the block specified in SOURCE.LNG with words found in the source
  2048.      file.  If the number of characters required is 4, and the keyword
  2049.      is 'endif', SOURCE will recognize 'endi' and 'endif', but not
  2050.      'end', 'endis' or 'endif1'.  If the 'part' keyword is not
  2051.      specified, SOURCE will treat the comment and block keywords in
  2052.      SOURCE.LNG as the full keyword that must be found in the file
  2053.      being printed.
  2054.  
  2055.      You may have more than one block that ends with the same keyword. 
  2056.      For example, 'if' - 'end', 'while' - 'end'. This would be defined
  2057.      as:
  2058.           :block:
  2059.           if
  2060.           end
  2061.           while
  2062.           end
  2063.  
  2064.      You may also specify blocks that begin with the same keyword and
  2065.      may end with more than one keyword.  One example is in Clipper. 
  2066.      the 'while' block may end with the 'end' or 'enddo' keywords. 
  2067.      This would be defined as:
  2068.  
  2069.           :block:
  2070.           while
  2071.           end
  2072.           while
  2073.           enddo
  2074.  
  2075.      In such cases, SOURCE will end the while block when ever if find
  2076.      'end' or 'enddo', which ever is first.
  2077.  
  2078.      8.4.4  Keywords
  2079.  
  2080.      After specifying the block definition, you must define those
  2081.      keywords that you would like highlighted when the 'k' option is
  2082.      active.  The definition begins with the keyword ':keyword:' and
  2083.      is followed by one keyword per line.  The keywords may have
  2084.      spaces in them.  The words may be entered in any order.  You may
  2085.      enter any words you like.  The idea is to highlight reserved
  2086.      words so you can pick out variables and function names easier. 
  2087.      If you have certain functions or other words you would like
  2088.      highlighted, simply add them to the list.  A partial list for 'C'
  2089.      would be:
  2090.  
  2091.           :keyword:
  2092.           auto
  2093.           break
  2094.           case
  2095.           char
  2096.           const
  2097.           continue
  2098.           . . .
  2099.  
  2100.  
  2101.                                      34
  2102.                                    SOURCE
  2103.  
  2104.      If the language is case dependant, ensure the keywords are
  2105.      entered in the proper case.  If case independent, the entered
  2106.      case is irrelevant.  If the language supports partial keyword
  2107.      matching (like dBASE), you must still enter the entire keyword. 
  2108.      SOURCE will highlight the entire keyword found in the program. 
  2109.      For example, if you have the keyword 'endtext' in the language
  2110.      definition, SOURCE will highlight 'endt', 'endte', 'endtex', or
  2111.      'endtext' in the program if the 'part 4' definition was placed at
  2112.      the end of language definition.
  2113.  
  2114.      It is important that the keywords entered into the definition
  2115.      only contain those characters entered on the second line of
  2116.      language definition.  If other characters are used, the keyword
  2117.      may not be highlighted properly.  You may define up to 400
  2118.      keywords per language.
  2119.  
  2120.      8.4.5  Include Files
  2121.  
  2122.      After specifying the keyword section, you must specify the syntax
  2123.      for include file references.  The definition begins with the
  2124.      keyword ':include:' and is followed by five lines per include
  2125.      file reference syntax.  The first line contains the text to be
  2126.      found prior to the name of the include file.  It is assumed that
  2127.      this is the first characters found on the line.  The second and
  2128.      third lines contain two possible strings that can occur after the
  2129.      filename.  The fourth line contains a list of directories to
  2130.      search for the include file.  The fifth line contains the default
  2131.      extension for the include file.  If the language does not supply
  2132.      default extensions, leave the line blank.  The list of
  2133.      directories will be searched in order.  If more than one
  2134.      directory is listed, they must all be on the same line separated
  2135.      by a semicolon or a space.
  2136.  
  2137.      An example of the include file syntax for Turbo Pascal is:
  2138.  
  2139.           {$I filename.ext}
  2140.  
  2141.      This would be entered into SOURCE.LNG as follows:
  2142.  
  2143.           :include:
  2144.           {$I
  2145.           }
  2146.                                    <== Blank line
  2147.           .;c:\pascal\include
  2148.           .pas                     <== Default extension
  2149.  
  2150.      The third line is blank since only one possible string can follow
  2151.      the filename.  The search path contains two directories.  The
  2152.      first is the current directory, the second is the
  2153.      'c:\pascal\include' directory.
  2154.  
  2155.      The 'C' language has two possible syntaxes.  These are:
  2156.  
  2157.           #include "filename.ext"
  2158.           #include <filename.ext>
  2159.  
  2160.                                      35
  2161.                                    SOURCE
  2162.  
  2163.      These would be defined in SOURCE.LNG as:
  2164.  
  2165.           :include:
  2166.           #include "
  2167.           "
  2168.                                    <== Blank line
  2169.           .;c:\include
  2170.                                    <== Blank line
  2171.           #include <
  2172.           >
  2173.                                    <== Blank line
  2174.           c:\include
  2175.                                    <== Blank line
  2176.  
  2177.      The first definition has two directories while the second only
  2178.      has one.  The first includes the current directory which is the
  2179.      only functional difference between the two syntaxes in 'C'. 
  2180.      Neither syntax has a default extension.
  2181.  
  2182.      COBOL is an example of using the third line.  The syntax for
  2183.      include files in COBOL is:
  2184.  
  2185.           COPY filename.txt [optional commands].
  2186.  
  2187.      Since this syntax includes some optional text after the filename
  2188.      before the period, the filename could end with a space or a
  2189.      period.  The definition would be:
  2190.  
  2191.           :include:
  2192.           COPY
  2193.                                    <== One space or blank line
  2194.           .
  2195.           c:\path;c:\another
  2196.                                    <== Blank line
  2197.  
  2198.      In this case, the second line may contain a single space or be
  2199.      blank.  SOURCE will treat a blank second line like a space to
  2200.      mark the end of the filename.  If no space is found, SOURCE will
  2201.      then look for a period character to end the filename.
  2202.  
  2203.      Currently, a language may have up to five syntaxes for include
  2204.      files.  The path list may be up to 198 characters long (again,
  2205.      all on one line).  If a language does not support include files,
  2206.      simply enter nothing after the ':include:' keyword.
  2207.  
  2208.      8.4.6  Page Feeds
  2209.  
  2210.      After specifying the include file section, you must specify the
  2211.      list of page feed commands.  The definition begins with the
  2212.      keyword ':pagefeed:' and is followed by one line per page feed
  2213.      command.  You may enter up to three page feed commands per
  2214.      language.  Very few standard languages have such commands.  The
  2215.      ones, as supplied, are Ada and RPG/free.  The command is assumed
  2216.      to be the first characters on the line.  A sample command for Ada
  2217.      is the 'page' pragma.  The definition would be as follows:
  2218.  
  2219.                                      36
  2220.                                    SOURCE
  2221.  
  2222.           :pagefeed:
  2223.           pragma page
  2224.  
  2225.      This is a very simple example.  The handling of the page feeds is
  2226.      specified by the 'P' option which also handles form feed (ASCII
  2227.      12) characters.  If a language does not have a page feed command,
  2228.      simply place nothing after the ':pagefeed:' keyword.
  2229.  
  2230.      8.4.7  Complete Definition
  2231.  
  2232.      Now that you have seen each part of the definition, here is a
  2233.      full definition as it would appear in SOURCE.LNG for 'C'.
  2234.  
  2235.           beginlang C *.c *.h
  2236.           abcdefghijklmnopqrstuvwxyz0123456789_   <== Valid characters
  2237.           :comment:
  2238.           /*
  2239.           */
  2240.           0                        <== Any column
  2241.           :string:
  2242.           "
  2243.           \
  2244.           '
  2245.           \
  2246.           :block:
  2247.           {
  2248.           }
  2249.           :keyword:
  2250.           auto
  2251.           break
  2252.           case
  2253.           char
  2254.           const
  2255.           continue
  2256.           . . .          <== There are more, but you get the point
  2257.           :include:
  2258.           #include "
  2259.           "
  2260.                                    <== Blank line
  2261.           .;c:\include
  2262.                                    <== Blank line
  2263.           #include <
  2264.           >
  2265.                                    <== Blank line
  2266.           .;c:\include
  2267.                                    <== Blank line
  2268.           :pagefeed:               <== No page feeds
  2269.           endlang case
  2270.  
  2271.      For dBase, the full definition would be:
  2272.  
  2273.           beginlang dbase *.prg
  2274.           :comment:
  2275.           *
  2276.                                    <== Comments end with end-of-line
  2277.  
  2278.                                      37
  2279.                                    SOURCE
  2280.  
  2281.           B                        <== Any column, but first character
  2282.           &&
  2283.                                    <== Comments end with end-of-line
  2284.           0                        <== Comment begins in any column
  2285.           note
  2286.                                    <== Comments end with end-of-line
  2287.           B
  2288.           :string:
  2289.           "
  2290.                                    <== No double quotes in strings
  2291.           :block:
  2292.           do case
  2293.           endcase
  2294.           do while
  2295.           enddo
  2296.           if
  2297.           endif
  2298.           text
  2299.           endtext
  2300.           :keyword:
  2301.           accept
  2302.           additive
  2303.           alias
  2304.           all
  2305.           all like
  2306.           append
  2307.           append from
  2308.           . . .          <== There are more, but you get the point
  2309.           :include:      <== dBase does not have include files
  2310.           :pagefeed:     <== No page feed commands either
  2311.           endlang part 4
  2312.  
  2313.      8.5  General Points
  2314.  
  2315.      Some points to keep in mind when defining a language.  If you
  2316.      have more than one language with the same extension, SOURCE will
  2317.      choose the last.  To override this, you can use the 'x' option on
  2318.      the command line to explicitly choose the language you really
  2319.      need.  
  2320.  
  2321.      While defining a comment, you may not define two or more pairs
  2322.      that begin with the same keyword, regardless of the ending
  2323.      keyword.  However, you may define any number of pairs that have
  2324.      the same ending keyword as long as the beginning keywords are
  2325.      unique.  Blocks do allow multiple ending keywords for the same
  2326.      beginning keyword.
  2327.  
  2328.      When defining blocks for the language, be careful with statements
  2329.      using variable syntax.  A good example is the 'IF' statement in
  2330.      some BASICs.  The syntax can be:
  2331.  
  2332.      1)   IF condition THEN statement [ELSE statement]
  2333.  
  2334.           or
  2335.  
  2336.  
  2337.                                      38
  2338.                                    SOURCE
  2339.  
  2340.      2)   IF condition THEN
  2341.             statements
  2342.           [ELSE
  2343.             statements]
  2344.           ENDIF
  2345.  
  2346.      DO NOT specify in your block definitions 'IF' - 'ENDIF' because
  2347.      if SOURCE encounters the first syntax, the line will never
  2348.      terminate because it will not find the 'ENDIF'.  Unfortunately,
  2349.      there is no solution to this.  The only downside is that you will
  2350.      not get trace lines for your IF statements.  If you know for a
  2351.      fact that you did not use the first syntax, then go ahead and
  2352.      specify the 'IF' - 'ENDIF' block.
  2353.  
  2354.      Another area to watch for is keywords that have multiple uses.  A
  2355.      good example is the 'for' keyword in Clipper.  'For' can be used
  2356.      in a 'FOR' - 'NEXT' loop (block) or in commands like 'display for
  2357.      ...'  If a 'FOR' - 'NEXT' block is defined and SOURCE comes
  2358.      across a line like 'display for NAME = "HELLO"', the 'for' will
  2359.      cause a block to begin.  For this reason, the 'FOR' - 'NEXT'
  2360.      block is not defined.
  2361.  
  2362.      9    Network Support
  2363.  
  2364.      SOURCE currently has limited network support.  The support
  2365.      offered at this time allows you to define an environment variable
  2366.      called "USER".  SOURCE will determine the value of "USER" and
  2367.      load the named configuration, from SOURCE.CFG, of the same name. 
  2368.      This configuration option will be used as the default set of
  2369.      options instead of "Default".
  2370.  
  2371.      This setup allows SOURCE to be installed on a network server. 
  2372.      Each user would add a line like:
  2373.  
  2374.      set USER=<name>
  2375.  
  2376.      to their "autoexec.bat" file.  The <name> would be a unique
  2377.      identifier for that person.  This could be a last name or
  2378.      initials.  The SOURCE.CFG file in the SOURCE directory would
  2379.      contain a named configuration for each user on the network.
  2380.  
  2381.      Care must be taken to limit write access to the common SOURCE.CFG
  2382.      file.  You may wish to allow only the network supervisor to
  2383.      update this file to prevent problems with each user adding their
  2384.      options.  Data will get lost if two people try editing at the
  2385.      same time.
  2386.  
  2387.      If SOURCE cannot find a named configuration with the same name as
  2388.      the value of "USER", SOURCE will fall back on the "Default" named
  2389.      configuration.
  2390.  
  2391.      Having the environment variable defined is slightly different
  2392.      from using the '-u <name>' command line option.  When using the
  2393.      environment variable, the matching named configuration is used in
  2394.      place of the default named configuration.  When using the 'u'
  2395.  
  2396.                                      39
  2397.                                    SOURCE
  2398.  
  2399.      option, the matching named configuration is loaded in addition to
  2400.      the default named configuration.
  2401.  
  2402.      10   Definition of Shareware
  2403.  
  2404.      Shareware distribution gives users a chance to try software
  2405.      before buying it.  If you try a Shareware program and continue
  2406.      using it, you are expected to register.
  2407.  
  2408.      Copyright laws apply to both Shareware and commercial software,
  2409.      and the copyright holder retains all rights, with a few specific
  2410.      exceptions as stated below.  Shareware authors are accomplished
  2411.      programmers, just like commercial authors, and the programs are
  2412.      of comparable quality.  (In both cases, there are good programs
  2413.      and bad ones!)  The main difference is in the method of
  2414.      distribution.  The author specifically grants the right to copy
  2415.      and distribute the software, either to all and sundry or to a
  2416.      specific group.  For example, some authors require written
  2417.      permission before a commercial disk vendor may copy their
  2418.      Shareware.
  2419.  
  2420.      Shareware is a distribution method, not a type of software.  You
  2421.      should find software that suits your needs and pocketbook,
  2422.      whether it's commercial or Shareware.  The Shareware system makes
  2423.      fitting your needs easier, because you can try before you buy.  
  2424.      And because the overhead is low, prices are low also.  Shareware
  2425.      has the ultimate money-back guarantee -- if you don't use the
  2426.      product, you don't pay for it.
  2427.  
  2428.      11   Disclaimer - Agreement For Using SOURCE
  2429.  
  2430.      Users of SOURCE must accept this disclaimer of warranty:
  2431.  
  2432.           "SOURCE is supplied as is.  The author disclaims all
  2433.           warranties, expressed or implied, including, without
  2434.           limitation, the warranties of merchantability and of
  2435.           fitness for any purpose.  The author assumes no
  2436.           liability for damages, direct or consequential, which
  2437.           may result from the use of SOURCE."
  2438.  
  2439.      SOURCE is a "shareware program" and is provided at no charge to
  2440.      the user for an evaluation period of 30 days.  Feel free to share
  2441.      it with your friends, but please do not give it away altered or
  2442.      as part of another system.  The essence of "user-supported"
  2443.      software is to provide personal computer users with quality
  2444.      software without high prices, and yet to provide incentive for
  2445.      programmers to continue to develop new products.  If you find
  2446.      this program useful and find that you are using SOURCE and
  2447.      continue to use SOURCE after the trial period, you must make a
  2448.      registration payment to Rick Maddy.  
  2449.  
  2450.      The registration fee will license one copy for use on any one
  2451.      computer at any one time.  You must treat this software just like
  2452.      a book.  An example is that this software may be used by any
  2453.      number of people and may be freely moved from one computer
  2454.  
  2455.                                      40
  2456.                                    SOURCE
  2457.  
  2458.      location to another, so long as there is no possibility of it
  2459.      being used at one location while it's being used at another. 
  2460.      Just as a book cannot be read by two different persons at the
  2461.      same time.  Site-License arrangements may be made by contacting
  2462.      Rick Maddy.
  2463.  
  2464.      You are encouraged to pass a copy of SOURCE along to your friends
  2465.      for evaluation.  Please encourage them to register their copy if
  2466.      they find that they can use it.  All registered users will
  2467.      receive a copy of the latest version of SOURCE in your name,
  2468.      printed documentation, a quick reference card, upgrade notices
  2469.      and discounts, and customer support.
  2470.  
  2471.      12   Registering
  2472.  
  2473.      You may use SOURCE for a free 30 day trial period.  If you
  2474.      continue to use SOURCE after the 30 day trial period, you are
  2475.      required to register your copy of SOURCE.
  2476.  
  2477.      When you register SOURCE you will be sent a disk with the latest
  2478.      version of SOURCE in your name, printed documentation, a quick
  2479.      reference card, upgrade notices and discounts, and customer
  2480.      support.  The cost of registration is $25.00.
  2481.  
  2482.      You can order directly from Rick Maddy by completing the
  2483.      registration form and mailing it and a check to:
  2484.  
  2485.                          Rick Maddy
  2486.                          2727 Folsom Street, Apt 104
  2487.                          Boulder, CO  80304
  2488.  
  2489.      The registration form is at the end of this document and in a
  2490.      separate file called register.txt.
  2491.  
  2492.      If you have any questions or comments, feel free to call Rick
  2493.      Maddy at (303) 440-3682 or leave a mail message on Compuserve at
  2494.      76460,1601.
  2495.  
  2496.      13   Future Enhancements
  2497.  
  2498.      I have a few ideas for making SOURCE an even better program. 
  2499.      Here is a brief list:
  2500.  
  2501.           - Full screen interface to replace command line.
  2502.           - Full screen programs for editing printer, language, and
  2503.             configuration files.
  2504.           - Windows 3.1 version.  (Under development).
  2505.           - Optional log file of all printed files.
  2506.           - Expanded network/multi-user support.
  2507.  
  2508.      I am open to any comments or suggestions for improvements or
  2509.      additions to SOURCE.  Please drop me a line.
  2510.  
  2511.      14   Acknowledgements
  2512.  
  2513.  
  2514.                                      41
  2515.                                    SOURCE
  2516.  
  2517.      I would like to thank the following people for all there help in
  2518.      finishing this program:
  2519.  
  2520.           - Scott Sidel for his help with making this program easier
  2521.             to use and writing this documentation.
  2522.  
  2523.           - Robert Harvey and William Moussiaux for beta testing
  2524.             SOURCE.
  2525.  
  2526.           - All the kind people who answered my questions on
  2527.             Compuserve.
  2528.  
  2529.           - All the people who sent in suggestions for improvements
  2530.             with their registrations.
  2531.  
  2532.      15   Release History
  2533.  
  2534.      10/14/92       Version 1.01
  2535.           - Original public release.
  2536.  
  2537.      10/21/92       Version 1.1
  2538.           - Fixed comment highlighting bug.  If two comment markers
  2539.             were found one character apart, SOURCE picked the one
  2540.             defined first in SOURCE.LNG instead of the first on the
  2541.             line.  Example in C:
  2542.  
  2543.                     //*** Comment ***
  2544.  
  2545.             SOURCE found the /* marker and then the // marker.  Since
  2546.             the starting position was only one character apart, SOURCE
  2547.             chose the /* marker since it was defined first.
  2548.  
  2549.           - Added additional comment support by adding the 'B'
  2550.             position specifier.  This allows you to define a comment
  2551.             to be anywhere on the line as long as it is the first non
  2552.             white space character found.  Example in dBASE:
  2553.  
  2554.                     * This is a comment
  2555.                     A = B * C
  2556.  
  2557.             The '*' is a comment marker.  The entire first line is a
  2558.             comment.  The second line does not contain a comment since
  2559.             the '*' is not the first character.  Version 1.01 would
  2560.             have highlighted the '*' and the 'C' on the second line
  2561.             since the comment position was specified to be 0, any
  2562.             position.
  2563.  
  2564.           - Fixed Append/Overwrite mode with numerous files.  When
  2565.             specifying overwrite mode with a list of files, the output
  2566.             of each file overwrote the output of the previous file. 
  2567.             Now, each subsequent file's output is appended to the
  2568.             first file's output.
  2569.  
  2570.           - Fixed a bug that caused comment highlighting to always be
  2571.             on if keyword highlighting was on.
  2572.  
  2573.                                      42
  2574.                                    SOURCE
  2575.  
  2576.           - Fixed a bug that caused keyword highlighting to work
  2577.             incorrectly if comment highlighting and block tracing were
  2578.             turned off.
  2579.  
  2580.           - Added a print statement explaining which language SOURCE
  2581.             will default to for an extension defined in more than one
  2582.             language.
  2583.  
  2584.      10/30/92       Version 1.2
  2585.           - Changed 'B' option to allow user to specify whether the
  2586.             letters of the banner are made up of the specific letter
  2587.             or asterisks.
  2588.  
  2589.           - Changed how SOURCE performs query or verify so all files
  2590.             are checked before any printing is done.
  2591.  
  2592.           - Enhanced a few error messages so they are more clear.
  2593.  
  2594.           - Enhanced the 'r' option to allow wildcards when
  2595.             redirecting to a file.  The functionality is now
  2596.             equivalent to the DOS COPY command.
  2597.  
  2598.      11/07/92       Version 1.3
  2599.           - Changed how partial keyword matching is implemented.  This
  2600.             change now requires that the full keywords be listed in
  2601.             the SOURCE.LNG file for languages like dBASE and Clipper. 
  2602.             This makes their definition like all other languages
  2603.             except for the 'part #' after the 'endlang' line in the
  2604.             definition.  This change will lower the number of
  2605.             extraneous keyword highlighting occurrences.
  2606.  
  2607.           - Fixed a small bug that only occurred if you had a [91] or
  2608.             [95] in the 8 lpi line of a printer definition.
  2609.  
  2610.           - Fixed a small bug that prevented SOURCE from reporting an
  2611.             error if the printer code was too long for a given
  2612.             attribute.
  2613.  
  2614.      04/22/93       Version 1.4
  2615.           - Expanded the maximum source code line length from 255
  2616.             characters to any length.
  2617.  
  2618.           - Expanded the 's' option to allow up to four columns per
  2619.             page.
  2620.  
  2621.           - Added the 'P' option to allow you to specify how to handle
  2622.             form feed characters.
  2623.  
  2624.           - Expanded the 't' option to specify the first tab stop in
  2625.             addition to the tab size.
  2626.  
  2627.           - Fixed a bug that occurred when you asked for highlighted
  2628.             keywords but regular comments.  In this case, multi-line
  2629.             comments had the 2nd and subsequent lines highlighted
  2630.             anyway.
  2631.  
  2632.                                      43
  2633.                                    SOURCE
  2634.  
  2635.           - Removed the restriction that keywords specified in
  2636.             SOURCE.LNG had to begin with a letter.  Now any character
  2637.             can begin a keyword.
  2638.  
  2639.           - Expanded the number of comments per language to 10.
  2640.  
  2641.           - Dynamically determine the path separator in pathnames ('/'
  2642.             or '\') by looking at the PATH environment variable.  This
  2643.             allows SOURCE to work with UNIX shells under DOS.
  2644.  
  2645.           - Fixed a problem when showing line and page numbers in a
  2646.             page footer.
  2647.  
  2648.           - Added the 'Q' option to show print statistics at the end. 
  2649.             This shows the number of files, pages, and lines printed.
  2650.  
  2651.           - Added the 'j' and 'J' options.  This allows you to force a
  2652.             specific line or page number as the first number used when
  2653.             printing, regardless of the physical number.  This worked
  2654.             real well when using SOURCE from within an editor like
  2655.             Brief.  I created a macro that will print the currently
  2656.             highlighted block of code using SOURCE.  The macros copies
  2657.             the code to a temporary file and SOURCE is called to print
  2658.             the file.  By specifying the 'j' option with the real line
  2659.             number of the first line in the temporary file, I get a
  2660.             print out with the proper line numbers.
  2661.  
  2662.           - Added the L option to specify what indentation level to
  2663.             use when printing block lines from the 'b' option.
  2664.  
  2665.           - Added the 'O' option to allow you to print odd or even
  2666.             pages, or both with a pause.  This allows for manual
  2667.             duplex printing.
  2668.  
  2669.           - Added the 'W' option to specify whether long lines should
  2670.             be wrapped or not.
  2671.  
  2672.           - Changed the SOURCE.PRT file to specify underline, bold,
  2673.             and italic printer codes.  This allows comments and
  2674.             keywords to be highlighted differently.
  2675.  
  2676.           - Changed the 'c' and 'k' options to take 'b', 'u', 'i',
  2677.             'o', or 'n' to facilitate the above change to SOURCE.PRT.
  2678.  
  2679.           - Changed language blocks to allow two or more blocks to
  2680.             begin with the same keyword but have different ending
  2681.             keywords.
  2682.  
  2683.           - Fixed memory problems when printing with the query option
  2684.             on.
  2685.  
  2686.           - Changed the filename extension list in a language
  2687.             definition to be filename patterns.  This allows a
  2688.             language to match on any part of the filename, not just
  2689.             the extension.
  2690.  
  2691.                                      44
  2692.                                    SOURCE
  2693.  
  2694.           - Added the 'T' option to allow lines to be truncated to a
  2695.             specific length prior to printing.
  2696.  
  2697.           - Fixed a small bug with the 'x' option.  The bug prevented
  2698.             you from placing a space between the 'x' and the language
  2699.             name.
  2700.  
  2701.           - Added the 'm' and 'M' options to work with include files.
  2702.  
  2703.           - Now compact pathnames that had '..' or '.' references in
  2704.             them.  Example:  'c:\src\code\..\file.ext' is now
  2705.             'c:\src\file.txt'.
  2706.  
  2707.           - Added the &pc function to the page header/footer
  2708.             definition to show the total number of pages.  This allows
  2709.             for 'Page 1 of 5' type printing in the header.
  2710.  
  2711.           - Fixed bug that prevented the 'h-2' option from printing a
  2712.             footer on every page.  The 'h-1' option worked though.
  2713.  
  2714.           - Added the 'E' option to specify page margins for a
  2715.             specific file.
  2716.  
  2717.           - Added support for page feed commands within a language.
  2718.  
  2719.           - Added support for list files on the command line.
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.  
  2733.  
  2734.  
  2735.  
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.                                      45
  2751.                             SOURCE REGISTRATION
  2752.  
  2753.      Remit to:                     From:
  2754.  
  2755.      Rick Maddy               Name:__________________________________
  2756.      2727 Folsom Street       Company:_______________________________
  2757.      Apt. 104                 Street:________________________________
  2758.      Boulder, CO 80304        City:__________________________________
  2759.      (303) 440-3682           State/Zip:_____________________________
  2760.                               Phone:_________________________________
  2761.      Compuserve Id:           Compuserve Id:_________________________
  2762.      76460, 1601
  2763.                               Name to register in:
  2764.                               (Up to 40 characters)
  2765.                               _______________________________________
  2766.  
  2767.  
  2768.      Qty:                     Unit Price               Total:
  2769.  
  2770.      ____ SOURCE Software     $25.00 (20 + 5 S&H)      ________
  2771.  
  2772.  
  2773.      Specify Disk Size:
  2774.  
  2775.      _____  5 1/4"       _____  3 1/2"
  2776.  
  2777.  
  2778.      Current Version of Source:______________________________________
  2779.  
  2780.      Where Obtained:_________________________________________________
  2781.  
  2782.      Comments:
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.